Skip to content

Commit 843be52

Browse files
Run different version of mypy in ci
1 parent 828ead6 commit 843be52

File tree

3 files changed

+25
-16
lines changed

3 files changed

+25
-16
lines changed

.github/workflows/test.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ jobs:
2121
strategy:
2222
matrix:
2323
python-version: ['3.10', '3.11', '3.12', '3.13']
24+
mypy-version: ['1.13', '1.14', '1.15', 'latest']
2425
fail-fast: false
2526
steps:
2627
- uses: actions/checkout@v4
@@ -31,7 +32,12 @@ jobs:
3132
- name: Install dependencies
3233
run: |
3334
pip install -U pip "setuptools<79.0.0" wheel
34-
SETUPTOOLS_ENABLE_FEATURES=legacy-editable pip install -r ./requirements.txt
35+
SETUPTOOLS_ENABLE_FEATURES=legacy-editable pip install -r ./requirements-base.txt
36+
if [ "${{ matrix.mypy-version }}" == "latest" ]; then
37+
pip install git+https://github.com/python/mypy.git@master
38+
else
39+
pip install mypy==${{ matrix.mypy-version }}
40+
fi
3541
3642
- name: Run mypy on plugin code
3743
run: mypy --strict mypy_django_plugin

requirements-base.txt

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Dev tools:
2+
pytest==8.3.5
3+
pytest-mypy-plugins==3.2.0
4+
pytest-shard==0.1.2
5+
pytest-xdist==3.6.1
6+
7+
# Needed by stubtest
8+
mysqlclient==2.2.7
9+
10+
# Django deps:
11+
psycopg2-binary
12+
Django==5.2.1
13+
-e ./ext
14+
-e .[redis,compatible-mypy,oracle]
15+
16+
# Overrides:
17+
pyright==1.1.400

requirements.txt

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,4 @@
1-
# Dev tools:
2-
pytest==8.3.5
3-
pytest-mypy-plugins==3.2.0
4-
pytest-shard==0.1.2
5-
pytest-xdist==3.6.1
6-
7-
# Needed by stubtest
8-
mysqlclient==2.2.7
9-
10-
# Django deps:
11-
psycopg2-binary
12-
Django==5.2.1
13-
-e ./ext
14-
-e .[redis,compatible-mypy,oracle]
1+
-r ./requirements-base.txt
152

163
# Overrides:
174
mypy==1.15.0
18-
pyright==1.1.400

0 commit comments

Comments
 (0)