Use extras to type fastapi helpers #144
Workflow file for this run
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: test | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| max-parallel: 2 | |
| matrix: | |
| python-version: ['3.9', '3.10', '3.11', '3.12', '3.13', '3.14'] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v5 | |
| with: | |
| # Install a specific version of uv. | |
| version: "0.5.24" | |
| enable-cache: true | |
| - name: Install the dependencies | |
| run: uv sync --all-extras --group dev | |
| - name: Create gcloud key file | |
| run: openssl base64 -d -A <<< '${{ secrets.GOOGLE_SERVICE_ACCOUNT_KEY }}' -out key.json | |
| - name: Run code quality | |
| run: | | |
| uv run ruff check | |
| uv run mypy . | |
| - name: Run tests | |
| run: | | |
| uv run -m pytest . | |
| - name: Upload coverage reports to Codecov | |
| if: matrix.python-version == 3.12 | |
| uses: codecov/codecov-action@v4.0.1 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| slug: thomasborgen/hypermedia | |
| file: ./coverage.xml |