Skip to content

Commit 2e47260

Browse files
committed
Use nox to test against Django 2 and 3.
1 parent 921086f commit 2e47260

File tree

4 files changed

+137
-6
lines changed

4 files changed

+137
-6
lines changed

.github/workflows/python.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,5 @@ jobs:
4545
- name: isort check
4646
run: poetry run isort --settings pyproject.toml --check .
4747

48-
- name: Run tests
49-
run: poetry run pytest -m "not slow"
50-
51-
- name: Run slow tests
52-
run: poetry run pytest -m "slow"
48+
- name: Run all tests
49+
run: poetry run nox

noxfile.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import nox
2+
3+
4+
@nox.session()
5+
@nox.parametrize("django", ["2.2", "3.0"])
6+
def tests(session, django):
7+
session.install("poetry")
8+
session.run("poetry", "install")
9+
session.install(f"django=={django}")
10+
session.run("pytest", "-m", "not slow")
11+
session.run("pytest", "-m", "slow")

poetry.lock

Lines changed: 123 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ django-mock-queries = "^2.1.5"
3232
pydantic = "^1.7.3"
3333
pywatchman = "^1.4.1"
3434
django-redis = "^4.12.1"
35+
nox = "^2020.12.31"
3536

3637
[build-system]
3738
requires = ["poetry>=0.12"]

0 commit comments

Comments
 (0)