Updated documentations for quickstart example in the docs/README #35
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 tests | |
| on: | |
| push: | |
| branches: [ main, master ] | |
| pull_request: | |
| branches: [ main, master ] | |
| jobs: | |
| tests: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.11"] | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| cache: 'pip' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install .[dev] | |
| - name: Lint with ruff | |
| run: | | |
| ruff --version | |
| ruff check . | |
| - name: Run tests with coverage | |
| run: | | |
| coverage run -m pytest -q | |
| - name: Generate coverage reports (xml and text) | |
| if: always() | |
| run: | | |
| coverage xml -o coverage.xml || true | |
| coverage report -m || true | |
| - name: Upload coverage report | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: coverage-py${{ matrix.python-version }} | |
| path: coverage.xml | |
| if-no-files-found: warn | |
| - name: Upload pytest cache and artifacts on failure | |
| if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: pytest-artifacts-py${{ matrix.python-version }} | |
| path: | | |
| .pytest_cache | |
| .coverage | |
| junit.xml | |
| if-no-files-found: ignore |