diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 688e4d1c..98862592 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,8 +13,6 @@ jobs: runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v3 - with: - submodules: true - uses: actions/setup-python@v4 - run: python -m pip install --upgrade pip - run: python -m pip install -r requirements/ci.txt @@ -23,6 +21,19 @@ jobs: with: commit_message: Apply automatic formatting + type-checking: + name: Type checking + needs: formatting + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 + with: + python-version: 3.11 + - run: python -m pip install --upgrade pip + - run: python -m pip install -r requirements/ci.txt + - run: tox -e mypy + tests: name: Tests ${{ matrix.os }} ${{ matrix.tox }} needs: formatting @@ -41,8 +52,6 @@ jobs: - run: sudo apt install --yes docker-compose if: ${{ contains(matrix.variant.os, 'ubuntu') }} - uses: actions/checkout@v3 - with: - submodules: true - uses: actions/setup-python@v4 with: python-version: ${{ matrix.python }} diff --git a/docs/release-notes.rst b/docs/release-notes.rst index bf2765d0..b441fa04 100644 --- a/docs/release-notes.rst +++ b/docs/release-notes.rst @@ -68,6 +68,8 @@ Deprecations Stability, Maintainability, and Testing ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +* The codebase now gets type-checked in CI. + v23.08.0 (2023-08-28) --------------------- diff --git a/tox.ini b/tox.ini index 65da3188..cb8772e4 100644 --- a/tox.ini +++ b/tox.ini @@ -35,6 +35,11 @@ allowlist_externals = sh # either the different formatters can't agree on a format or that static analysis failed. commands = sh -c 'pre-commit run -a || (echo "" && pre-commit run -a)' +[testenv:mypy] +description = Type checking (mypy) +deps = -r requirements/mypy.txt +commands = python -m mypy . + [testenv:deps] description = Update dependencies by running pip-compile-multi deps = pip-compile-multi