diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 570cd45fe4..31cabd6725 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -227,6 +227,38 @@ jobs: working-directory: deltachat-rpc-client run: tox -e lint + # mypy does not work with PyPy since mypy 1.19 + # as it introduced native `librt` dependency + # that uses CPython internals. + # We only run mypy with CPython because of this. + cffi_python_mypy: + name: CFFI Python mypy + needs: ["c_library", "python_lint"] + runs-on: ubuntu-latest + timeout-minutes: 60 + steps: + - uses: actions/checkout@v5 + with: + show-progress: false + persist-credentials: false + + - name: Download libdeltachat.a + uses: actions/download-artifact@v6 + with: + name: ubuntu-latest-libdeltachat.a + path: target/debug + + - name: Install tox + run: pip install tox + + - name: Run mypy + env: + DCC_RS_TARGET: debug + DCC_RS_DEV: ${{ github.workspace }} + working-directory: python + run: tox -e mypy + + cffi_python_tests: name: CFFI Python tests needs: ["c_library", "python_lint"] @@ -280,7 +312,7 @@ jobs: DCC_RS_TARGET: debug DCC_RS_DEV: ${{ github.workspace }} working-directory: python - run: tox -e mypy,doc,py + run: tox -e doc,py rpc_python_tests: name: JSON-RPC Python tests diff --git a/python/tox.ini b/python/tox.ini index df5c3c8d30..bc320b8796 100644 --- a/python/tox.ini +++ b/python/tox.ini @@ -50,7 +50,7 @@ commands = [testenv:mypy] deps = - mypy==1.18.2 + mypy typing types-setuptools types-requests