Skip to content

Commit b043031

Browse files
author
Rami Chowdhury
committed
Use nox as test runner
1 parent 9823063 commit b043031

File tree

5 files changed

+323
-319
lines changed

5 files changed

+323
-319
lines changed

.github/workflows/tests.yaml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
with:
1212
python-version: 3.10
1313
- uses: pre-commit/action@v2
14-
pytest:
14+
tests:
1515
name: pytest
1616
runs-on: ubuntu-latest
1717
strategy:
@@ -26,7 +26,6 @@ jobs:
2626
python-version: ${{ matrix.python-version }}
2727
- name: Ensure poetry
2828
uses: abatilo/actions-poetry@v2
29-
- name: Install dependencies
30-
run: poetry install
31-
- name: Run matrix of tests with Tox
32-
run: poetry run tox
29+
- uses: wntrblm/nox
30+
- name: Run matrix of tests
31+
run: nox

noxfile.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
from nox import parametrize, session
2+
3+
4+
@session
5+
@parametrize(
6+
"python,pydantic",
7+
[
8+
(python, pydantic)
9+
for python in ("3.10", "3.11", "3.7", "3.8", "3.9")
10+
for pydantic in ("1.9", "1.10", "1.7", "1.8")
11+
if (python, pydantic) not in (("3.10", "1.7"), ("3.10", "1.8"))
12+
],
13+
)
14+
def tests(session, python, pydantic):
15+
session.install(f"pydantic=={pydantic}")
16+
session.install("pytest", "pytest-cov", ".")
17+
session.run(
18+
"pytest", "-v", "tests/", "--cov-report=term-missing", "--cov=graphene_pydantic"
19+
)

0 commit comments

Comments
 (0)