Skip to content

Commit

Permalink
Use nox as test runner
Browse files Browse the repository at this point in the history
  • Loading branch information
Rami Chowdhury committed Sep 4, 2023
1 parent 9823063 commit b043031
Show file tree
Hide file tree
Showing 5 changed files with 323 additions and 319 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
with:
python-version: 3.10
- uses: pre-commit/action@v2
pytest:
tests:
name: pytest
runs-on: ubuntu-latest
strategy:
Expand All @@ -26,7 +26,6 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Ensure poetry
uses: abatilo/actions-poetry@v2
- name: Install dependencies
run: poetry install
- name: Run matrix of tests with Tox
run: poetry run tox
- uses: wntrblm/nox
- name: Run matrix of tests
run: nox
19 changes: 19 additions & 0 deletions noxfile.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
from nox import parametrize, session


@session
@parametrize(
"python,pydantic",
[
(python, pydantic)
for python in ("3.10", "3.11", "3.7", "3.8", "3.9")
for pydantic in ("1.9", "1.10", "1.7", "1.8")
if (python, pydantic) not in (("3.10", "1.7"), ("3.10", "1.8"))
],
)
def tests(session, python, pydantic):
session.install(f"pydantic=={pydantic}")
session.install("pytest", "pytest-cov", ".")
session.run(
"pytest", "-v", "tests/", "--cov-report=term-missing", "--cov=graphene_pydantic"
)
Loading

0 comments on commit b043031

Please sign in to comment.