diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index d5ac974..97fe82f 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -7,7 +7,6 @@ jobs: strategy: matrix: python-version: ["3.10", "3.11"] - pydantic-version: ["1.9.1", "2.0.3"] permissions: id-token: write @@ -33,4 +32,4 @@ jobs: run: poetry run mypy open_rarity - name: Unit tests - run: poetry run pytest --cov-config=.coveragerc --cov=open_rarity tests/ + run: nox --session tests-${{ matrix.python_version }} diff --git a/noxfile.py b/noxfile.py new file mode 100644 index 0000000..dffb6a0 --- /dev/null +++ b/noxfile.py @@ -0,0 +1,9 @@ +import nox +from nox import Session + + +@nox.session(python=["3.10", "3.11"]) +@nox.parametrize("pydantic", ["1.9.1", "2.0.3"]) +def tests(session: Session, pydantic): + session.install(f'pydantic=={pydantic}') + session.run("poetry", "run", "pytest") diff --git a/pyproject.toml b/pyproject.toml index 8116d03..f2c2490 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -28,7 +28,7 @@ python = ">=3.10,<3.12" requests = "^2.28.1" scipy = "^1.9.0" -[tool.poetry.dev-dependencies] +[tool.poetry.group.dev.dependencies] black = "^23.7.0" flake8 = "^5.0.2" flake8-bugbear = "^22.7.1" @@ -40,6 +40,7 @@ pytest = "^7.1" pytest-cov = "^3.0" pytest-mock = "^3.10.0" types-requests = "^2.28.6" +nox = "^2023.4.22" [tool.black] line-length = 88