[DOCS, FIX] edit pre-commit hooks, update FastAPI-fastkit guides #67
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 and Coverage | |
| permissions: | |
| contents: read | |
| on: | |
| pull_request: | |
| types: | |
| - opened | |
| - synchronize | |
| jobs: | |
| test-fastapi-fastkit-sources: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: | |
| - "3.14" # max | |
| - "3.13" | |
| - "3.12" # min requirements | |
| - "3.11" # supported, but full functionality not guaranteed | |
| - "3.10" # supported, but full functionality not guaranteed | |
| - "3.9" # supported, but full functionality not guaranteed | |
| fail-fast: false | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Setup PDM | |
| uses: pdm-project/setup-pdm@v4 | |
| - name: Install package managers for tests | |
| run: | | |
| pip install uv | |
| pip install poetry | |
| # PDM is already installed via setup-pdm action | |
| - name: Install dependencies | |
| run: pdm install -G dev | |
| - name: Run tests with coverage | |
| run: | | |
| pdm run pytest --cov=src/fastapi_fastkit --cov-report=term-missing --cov-report=xml --cov-fail-under=70 | |
| - name: Upload coverage to Codecov | |
| if: matrix.python-version == '3.12' | |
| uses: codecov/codecov-action@v4 | |
| with: | |
| file: ./coverage.xml | |
| flags: unittests | |
| name: codecov-umbrella | |
| fail_ci_if_error: false | |
| token: ${{ secrets.CODECOV_TOKEN }} |