docling/.github/workflows/checks.yml
Michele Dolfi 2ad85fdf97 make sure examples return failures
Signed-off-by: Michele Dolfi <dol@zurich.ibm.com>
2024-08-28 12:49:43 +02:00

29 lines
780 B
YAML

on:
workflow_call:
jobs:
run-checks:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.10', '3.11', '3.12']
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/setup-poetry
with:
python-version: ${{ matrix.python-version }}
- name: Run styling check
run: poetry run pre-commit run --all-files
- name: Install with poetry
run: poetry install --all-extras
- name: Run examples
run: |
for file in examples/*.py; do
echo "Running example $file"
poetry run python "$file" || exit 1
done
- name: Testing
run: |
poetry run pytest -v tests
- name: Build with poetry
run: poetry build