From 5a33f8f511120d4bfdcbbd746a6377e1bb6d408e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Saugat=20Pachhai=20=28=E0=A4=B8=E0=A5=8C=E0=A4=97=E0=A4=BE?= =?UTF-8?q?=E0=A4=A4=29?= Date: Fri, 6 Jan 2023 21:03:33 +0545 Subject: [PATCH] test multiple python version --- .github/workflows/tests.yaml | 13 ++++++++----- noxfile.py | 6 ++++-- setup.cfg | 2 +- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 1123f87..6c1f2b2 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -3,15 +3,18 @@ on: push jobs: tests: runs-on: ubuntu-latest - strategy: - matrix: - python-version: ['3.7', '3.8', '3.9', '3.10'] - name: Python ${{ matrix.python-version }} steps: - uses: actions/checkout@v3 - uses: actions/setup-python@v4 with: - python-version: ${{ matrix.python-version }} + python-version: | + 3.8 + 3.9 + 3.10 + 3.11 + pypy3.8 + pypy3.9 + 3.7 - run: pip install -U nox - run: nox - run: nox -s build diff --git a/noxfile.py b/noxfile.py index 31a6867..dd0a489 100644 --- a/noxfile.py +++ b/noxfile.py @@ -10,7 +10,9 @@ locations = "pytest_test_utils", "tests.py" -@nox.session(python=["3.7", "3.8", "3.9", "3.10"]) +@nox.session( + python=["3.7", "3.8", "3.9", "3.10", "3.11", "pypy3.8", "pypy3.9"] +) def tests(session: nox.Session) -> None: session.install(".[tests]") # `pytest --cov` will start coverage after pytest @@ -20,7 +22,7 @@ def tests(session: nox.Session) -> None: @nox.session(python=["3.7", "3.8"]) -@nox.parametrize("pytest", ["5", "6"]) +@nox.parametrize("pytest", ["3.9.1", "4.0", "5.0", "6.0"]) def compat(session: nox.Session, pytest: str) -> None: session.install(".[tests]") session.install(f"pytest=={pytest}") diff --git a/setup.cfg b/setup.cfg index edd14c2..b79e675 100644 --- a/setup.cfg +++ b/setup.cfg @@ -22,7 +22,7 @@ python_requires = >=3.7 zip_safe = False packages = find: install_requires= - pytest>=5 + pytest>=3.9 [options.extras_require] tests =