Skip to content

Commit e852708

Browse files
committed
Start using github actions matrix to run tests instead of tox and add running mypy
1 parent 7d58e87 commit e852708

File tree

2 files changed

+22
-13
lines changed

2 files changed

+22
-13
lines changed

.github/workflows/run-tests.yml

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,18 @@ jobs:
1313
runs-on: ubuntu-latest
1414
strategy:
1515
matrix:
16-
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13.0-rc.1"]
17-
django-version: ["django==4.2.*", "django==5.0.*", "django==5.1.*", "django==5.2.*"]
16+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
17+
django-version: ["django==4.2.*", "django==5.0.*", "django==5.1.*"]
1818
exclude:
19-
- python-version: "3.12"
20-
django-version: "django<4.2.8"
21-
- python-version: "3.13.0-rc.1"
22-
django-version: "django<5.2"
19+
- python-version: "3.8"
20+
django-version: "django==5.0.*"
21+
- python-version: "3.8"
22+
django-version: "django==5.1.*"
23+
- python-version: "3.9"
24+
django-version: "django==5.0.*"
25+
- python-version: "3.9"
26+
django-version: "django==5.1.*"
27+
2328
steps:
2429
- uses: actions/checkout@v3
2530
- name: Set up Python ${{ matrix.python-version }}
@@ -30,9 +35,14 @@ jobs:
3035
run: |
3136
python -m pip install --upgrade pip
3237
pip install -r requirements_test.txt
38+
pip install -c requirements_test.txt ${{ matrix.django-version }}
3339
- name: Lint with ruff
3440
run: |
3541
# stop the build if there are Python syntax errors or undefined names
3642
make ruff-check
37-
- name: Run Tox
38-
run: tox
43+
- name: MyPy
44+
run: cd django_mail_viewer && mypy .
45+
- name: Run Tests
46+
run: |
47+
coverage run --source django_mail_viewer runtests.py
48+
coverage report

tox.ini

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ envlist =
33
{py38,py39,py310,311,312}-django-42
44
{py310,311,312}-django-50
55
{py310,311,312}-django-51
6-
{py310,311,312}-django-52
76
stats
87

98
[gh-actions]
@@ -12,7 +11,7 @@ python =
1211
3.9: py39
1312
3.10: py310
1413
3.11: py311
15-
3.11: py312
14+
3.12: py312
1615

1716
[testenv]
1817
setenv =
@@ -22,9 +21,9 @@ commands =
2221
mypy django_mail_viewer
2322

2423
deps =
25-
django-32: Django>=3.2,<3.3
26-
django-40: Django>=4.0,<4.1
27-
django-41: Django>=4.1,<4.2
24+
django-52: Django>=5.2,<5.3
25+
django-50: Django>=5.0,<5.1
26+
django-42: Django>=4.2,<4.3
2827
-r{toxinidir}/requirements_test.txt
2928

3029
basepython =

0 commit comments

Comments
 (0)