Skip to content

Commit

Permalink
use nox
Browse files Browse the repository at this point in the history
  • Loading branch information
damjankuznar committed Jul 25, 2023
1 parent d4ee4aa commit 8af5ef6
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 }}
9 changes: 9 additions & 0 deletions noxfile.py
Original file line number Diff line number Diff line change
@@ -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")
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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
Expand Down

0 comments on commit 8af5ef6

Please sign in to comment.