Improve how we run mypy on the py312 stubs (#10152)

This commit is contained in:
Alex Waygood
2023-05-10 09:05:45 +01:00
committed by GitHub
parent dfee77ef6b
commit 1221b47118

View File

@@ -85,7 +85,7 @@ jobs:
strategy:
matrix:
platform: ["linux", "win32", "darwin"]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12-dev"]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
fail-fast: false
steps:
- uses: actions/checkout@v3
@@ -97,6 +97,26 @@ jobs:
- run: pip install -r requirements-tests.txt
- run: python ./tests/mypy_test.py --platform=${{ matrix.platform }} --python-version=${{ matrix.python-version }}
# Run mypy slightly differently on the py312 stubs,
# as mypyc doesn't work on Python 3.12 yet
# (and various non-types dependencies can't be installed on Python 3.12 yet)
mypy-312:
name: Run mypy against the stubs (3.12)
runs-on: ubuntu-latest
strategy:
matrix:
platform: ["linux", "win32", "darwin"]
fail-fast: false
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.11"
cache: pip
cache-dependency-path: requirements-tests.txt
- run: pip install -r requirements-tests.txt
- run: python ./tests/mypy_test.py --platform=${{ matrix.platform }} --python-version=3.12
regression-tests:
name: Run mypy on the test cases
runs-on: ubuntu-latest