This repository was archived by the owner on May 22, 2026. It is now read-only.
Repository navigation
Lab03 Completed (#3) #14
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Python CI | |
| on: | |
| push: | |
| paths: | |
| - app_python/** | |
| - .github/actions/python-setup/** | |
| - .github/workflows/python-ci.yml | |
| pull_request: | |
| branches: | |
| - master | |
| paths: | |
| - app_python/** | |
| - .github/actions/python-setup/** | |
| - .github/workflows/python-ci.yml | |
| jobs: | |
| test: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: [3.14] | |
| poetry-version: [2.3.2] | |
| os: [ubuntu-latest] | |
| runs-on: ${{ matrix.os }} | |
| defaults: | |
| run: | |
| working-directory: ./app_python | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Setup Python tooling and dependencies | |
| uses: ./.github/actions/python-setup | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| poetry-version: ${{ matrix.poetry-version }} | |
| working-directory: app_python | |
| lockfile-path: app_python/poetry.lock | |
| install-args: --with dev --no-interaction --no-ansi | |
| - name: Lint with flake8 | |
| run: poetry run flake8 src tests | |
| - name: Test using pytest with coverage report | |
| run: | | |
| mkdir -p test-results | |
| poetry run pytest \ | |
| --junitxml=test-results/pytest-report.xml \ | |
| --cov=src \ | |
| --cov-report=term-missing \ | |
| --cov-report=xml:test-results/coverage.xml | |
| - name: Upload pytest and coverage reports | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: python-test-reports | |
| path: | | |
| app_python/test-results/pytest-report.xml | |
| app_python/test-results/coverage.xml |