Skip to content

Commit 7dde482

Browse files
committed
add mypy typecheck to build.yaml
1 parent 4fff635 commit 7dde482

2 files changed

Lines changed: 24 additions & 0 deletions

File tree

.github/workflows/build.yaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,24 @@ jobs:
4040
uses: codecov/codecov-action@v4
4141
env:
4242
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
43+
typecheck-code:
44+
runs-on: ubuntu-latest
45+
strategy:
46+
matrix:
47+
include:
48+
- python-version: "3.14"
49+
steps:
50+
- name: Checkout source repo
51+
uses: actions/checkout@v4
52+
- name: Setup Python ${{ matrix.python-version }}
53+
uses: actions/setup-python@v5
54+
with:
55+
python-version: ${{ matrix.python-version }}
56+
- name: Pip install --group typing
57+
run: pip install --group typing
58+
- name: Run mypy
59+
run: |
60+
FAILED=0
61+
python -m mypy || FAILED=$?
62+
[ $FAILED -eq 0 ] || echo "::warning::mypy failed with exit code $FAILED"
63+
shell: bash

pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,9 @@ typing = [
7979
"mypy",
8080
]
8181

82+
[tool.mypy]
83+
packages = ["features"]
84+
8285
[tool.flake8]
8386
exclude = ["docs", "build", ".tox"]
8487
ignore = ["E126", "E128", "W503"]

0 commit comments

Comments
 (0)