diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 117e6875..574dfd70 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,7 +20,6 @@ jobs: matrix: os: [ubuntu-20.04, windows-latest, macos-latest] python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"] - tox-version: ["latest", "<4"] steps: - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} @@ -37,8 +36,11 @@ jobs: - name: Install Nox-under-test run: | python -m pip install --disable-pip-version-check . - - name: Run tests on ${{ matrix.os }} - run: nox --non-interactive --error-on-missing-interpreter --session "tests(python='${{ matrix.python-version }}', tox_version='${{ matrix.tox-version }}')" -- --full-trace + - name: Run tests on ${{ matrix.os }} (tox <4) + run: nox --non-interactive --error-on-missing-interpreter --session "tests(python='${{ matrix.python-version }}', tox_version='<4')" -- --full-trace + - name: Run tox-to-nox tests on ${{ matrix.os }} (tox latest) + run: nox --non-interactive --error-on-missing-interpreter --session "tests(python='${{ matrix.python-version }}', tox_version='latest')" -- tests/test_tox_to_nox.py --full-trace + if: matrix.python-version != '3.7' - name: Save coverage report uses: actions/upload-artifact@v4 with: diff --git a/noxfile.py b/noxfile.py index 3fdcbaa2..a7a665c7 100644 --- a/noxfile.py +++ b/noxfile.py @@ -33,6 +33,9 @@ nox.options.sessions.append("conda_tests") +# Because there is a dependency conflict between argcomplete and the latest tox +# (both depend on a different version of importlibmetadata for Py 3.7) pip +# installs tox 3 as the latest one for Py 3.7. @nox.session @nox.parametrize( "python, tox_version", @@ -40,16 +43,11 @@ (python, tox_version) for python in ("3.7", "3.8", "3.9", "3.10", "3.11", "3.12") for tox_version in ("latest", "<4") + if (python, tox_version) != ("3.7", "latest") ], ) def tests(session: nox.Session, tox_version: str) -> None: """Run test suite with pytest.""" - # Because there is a dependency conflict between - # argcomplete and the latest tox (both depend on - # a different version of importlibmetadata for Py 3.7) - # pip installs tox 3 as the latest one for Py 3.7. - if session.python == "3.7" and tox_version == "latest": - return coverage_file = ( f".coverage.{sys.platform}.{session.python}.tox{tox_version.lstrip('<')}"