Deprecate and update python support #2848
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: Tests | |
| on: | |
| pull_request: | |
| branches: | |
| - "*" | |
| push: | |
| branches: | |
| - "*" | |
| schedule: | |
| - cron: "0 1 * * *" | |
| workflow_dispatch: | |
| jobs: | |
| unit-tests: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.10", "3.11", "3.12", "3.13", "3.14", "pypy3.11"] | |
| flask: ["<3.0.0", ">=3.0.0"] | |
| exclude: | |
| - python-version: "3.13" | |
| flask: "<3.0.0" | |
| - python-version: "3.14" | |
| flask: "<3.0.0" | |
| steps: | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| allow-prereleases: true | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| # PyPy: pin rpds-py before resolving jsonschema/referencing so pip picks manylinux wheels | |
| # (sdists use maturin; builds are fragile on PyPy). CPython does not need this. | |
| case "${{ matrix.python-version }}" in | |
| pypy3.11) pip install 'rpds-py<0.30' 'readme-renderer>=35,<42' ;; | |
| esac | |
| pip install "flask${{ matrix.flask }}" | |
| pip install ".[test]" | |
| - name: Test with inv | |
| run: inv cover qa | |
| - name: Codecov | |
| uses: codecov/codecov-action@v1 | |
| with: | |
| file: ./coverage.xml | |
| bench: | |
| needs: unit-tests | |
| runs-on: ubuntu-latest | |
| if: github.event_name == 'pull_request' | |
| steps: | |
| - name: Set up Python 3.12 | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: "3.12" | |
| - name: Checkout ${{ github.base_ref }} | |
| uses: actions/checkout@v3 | |
| with: | |
| ref: ${{ github.base_ref}} | |
| path: base | |
| - name: Checkout ${{ github.ref }} | |
| uses: actions/checkout@v3 | |
| with: | |
| ref: ${{ github.ref}} | |
| path: ref | |
| - name: Install dev dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -e "base[dev]" | |
| - name: Install ci dependencies for ${{ github.base_ref }} | |
| run: pip install -e "base[ci]" | |
| - name: Benchmarks for ${{ github.base_ref }} | |
| run: | | |
| cd base | |
| inv benchmark --max-time 4 --save | |
| mv .benchmarks ../ref/ | |
| - name: Install ci dependencies for ${{ github.ref }} | |
| run: pip install -e "ref[ci]" | |
| - name: Benchmarks for ${{ github.ref }} | |
| run: | | |
| cd ref | |
| inv benchmark --max-time 4 --compare |