diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f3107ef..1282c3d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -37,7 +37,7 @@ jobs: fail-fast: false matrix: os: [ 'ubuntu-24.04', 'ubuntu-22.04', 'macos-14', 'macos-13' ] - python: [ '3.8', '3.9', '3.10', '3.11', '3.12' ] + python: [ '3.13', '3.12', '3.11', '3.10', '3.9', '3.8' ] name: Python ${{ matrix.python }} (${{ matrix.os }}) steps: - name: Checkout repo @@ -52,8 +52,8 @@ jobs: - name: Run tests run: make test VERBOSE=1 - - name: Install Python deps for typechecking tests - run: python -m pip install -r requirements-test.txt + - name: Install Python deps for Mypy typechecking tests + run: python -m pip install -r requirements-mypy.txt - name: Check types with Mypy run: make mypy-test @@ -61,6 +61,15 @@ jobs: # We will make it required once we've fixed any existing issues. continue-on-error: true + - name: Install Python deps for PyType typechecking tests + run: python -m pip install -r requirements-pytype.txt + # https://github.com/google/pytype/issues/1475 + # + # PyType does not yet support Python 3.12 or later; if this step is + # enabled, it fails with an error: "Python versions > 3.11 are not yet + # supported." + if: ${{ (matrix.python != '3.13') && (matrix.python != '3.12') }} + - name: Check types with PyType run: make pytype-test # Mark this check optional for now, in case it starts out failing. @@ -68,6 +77,7 @@ jobs: continue-on-error: true # https://github.com/google/pytype/issues/1475 # - # PyType does not yet support Python 3.12; if this step is enabled, it - # fails with an error: "Python versions > 3.11 are not yet supported." - if: ${{ matrix.python != '3.12' }} + # PyType does not yet support Python 3.12 or later; if this step is + # enabled, it fails with an error: "Python versions > 3.11 are not yet + # supported." + if: ${{ (matrix.python != '3.13') && (matrix.python != '3.12') }} diff --git a/requirements-mypy.txt b/requirements-mypy.txt new file mode 100644 index 0000000..8185ac7 --- /dev/null +++ b/requirements-mypy.txt @@ -0,0 +1 @@ +mypy ~= 1.9.0 diff --git a/requirements-pytype.txt b/requirements-pytype.txt new file mode 100644 index 0000000..5bfa40a --- /dev/null +++ b/requirements-pytype.txt @@ -0,0 +1 @@ +pytype ~= 2024.3.19 diff --git a/requirements-test.txt b/requirements-test.txt deleted file mode 100644 index 2d4b571..0000000 --- a/requirements-test.txt +++ /dev/null @@ -1,3 +0,0 @@ -# Type checking. -mypy ~= 1.9.0 -pytype ~= 2024.3.19