update for mypy 1.20.0 #4874
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: Run tests | |
| on: | |
| # run on push in main or rel_* branches excluding changes are only on doc or example folders | |
| push: | |
| branches: | |
| - main | |
| - "rel_*" | |
| # branches used to test the workflow | |
| - "workflow_test_*" | |
| paths-ignore: | |
| - "examples/**" | |
| env: | |
| # global env to all steps | |
| TOX_WORKERS: -n4 | |
| permissions: | |
| contents: read | |
| jobs: | |
| run-test: | |
| name: test-${{ matrix.python-version }}-${{ matrix.os }}-${{ matrix.architecture }}-${{ matrix.build-type }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| # run this job using this matrix, excluding some combinations below. | |
| matrix: | |
| os: | |
| - "ubuntu-22.04" | |
| - "ubuntu-22.04-arm" | |
| - "windows-latest" | |
| - "macos-latest" | |
| python-version: | |
| - "3.8" | |
| - "3.9" | |
| - "3.10" | |
| - "3.11" | |
| - "3.12" | |
| - "3.13" | |
| - "3.14" | |
| - "pypy-3.10" | |
| build-type: | |
| # builds greenlet, runs asyncio tests. includes aiosqlite driver | |
| - "cext-greenlet" | |
| # these do not install greenlet at all and skip asyncio tests. | |
| # does not include aiosqlite driver | |
| - "cext" | |
| - "nocext" | |
| architecture: | |
| - x64 | |
| - x86 | |
| - arm64 | |
| include: | |
| # autocommit tests fail on the ci for some reason | |
| - python-version: "pypy-3.10" | |
| pytest-args: "-k 'not test_autocommit_on and not test_turn_autocommit_off_via_default_iso_level and not test_autocommit_isolation_level'" | |
| exclude: | |
| # the threaded pythons are not stable under greenlet. Even | |
| # though we can run individual tests, when you run the whole suite | |
| # with xdist and the greenlet wrapper, the workers keep crashing | |
| # and getting replaced | |
| - build-type: "cext-greenlet" | |
| python-version: "3.13t" | |
| - build-type: "cext-greenlet" | |
| python-version: "3.14t-dev" | |
| # linux do not have x86 / arm64 python | |
| - os: "ubuntu-22.04" | |
| architecture: x86 | |
| - os: "ubuntu-22.04" | |
| architecture: arm64 | |
| # linux-arm does not have x86 / x64 python | |
| - os: "ubuntu-22.04-arm" | |
| architecture: x86 | |
| - os: "ubuntu-22.04-arm" | |
| architecture: x64 | |
| # windows does not have arm64 python | |
| - os: "windows-latest" | |
| architecture: arm64 | |
| # macos: latests uses arm macs. only 3.10+; no x86/x64 | |
| - os: "macos-latest" | |
| architecture: x86 | |
| - os: "macos-latest" | |
| architecture: x64 | |
| - os: "macos-latest" | |
| python-version: "3.8" | |
| - os: "macos-latest" | |
| python-version: "3.9" | |
| # pypy does not have cext or x86 or arm on linux | |
| - python-version: "pypy-3.10" | |
| build-type: "cext" | |
| - os: "ubuntu-22.04-arm" | |
| python-version: "pypy-3.10" | |
| - os: "windows-latest" | |
| python-version: "pypy-3.10" | |
| architecture: x86 | |
| fail-fast: false | |
| # steps to run in each job. Some are github actions, others run shell commands | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v4 | |
| - name: Set up python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| architecture: ${{ matrix.architecture }} | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install --upgrade nox setuptools | |
| pip list | |
| - name: Run tests | |
| run: nox -v -s github-${{ matrix.build-type }} -- ${{ matrix.pytest-args }} | |
| continue-on-error: ${{ matrix.python-version == 'pypy-3.10' }} | |
| run-nox: | |
| name: ${{ matrix.nox-env }}-${{ matrix.python-version }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| # run this job using this matrix, excluding some combinations below. | |
| matrix: | |
| os: | |
| - "ubuntu-22.04" | |
| python-version: | |
| - "3.13" | |
| nox-env: | |
| - mypy | |
| - pep484 | |
| - pep8 | |
| fail-fast: false | |
| # steps to run in each job. Some are github actions, others run shell commands | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v4 | |
| - name: Set up python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| architecture: ${{ matrix.architecture }} | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install --upgrade nox setuptools | |
| pip list | |
| - name: Run nox | |
| run: nox -v -e ${{ matrix.nox-env }} ${{ matrix.pytest-args }} |