diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index ff29a79c..9c6e9678 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -19,16 +19,16 @@ jobs: py: - "3.11" - "3.10" - - "pypy3.9" - "3.9" - "3.8" - "3.7" + - "pypy3.9" + - "pypy3.8" + - "pypy3.7" os: - ubuntu-22.04 - windows-2022 - macos-12 - exclude: - - { os: windows-2022, py: "pypy3.9" } steps: - name: Setup python for tox @@ -53,19 +53,28 @@ jobs: file_handler.write(env) shell: python - name: Setup test suite - run: tox -vv --notest - - name: Run test suite - run: tox --skip-pkg-install + run: tox r -vv --notest + - if: ${{ startsWith(matrix.py, 'pypy') }} + name: Run test suite + run: tox r --skip-pkg-install -- + env: + PYTEST_ADDOPTS: "-vv --durations=20" + CI_RUN: "yes" + - if: ${{ !startsWith(matrix.py, 'pypy')}} + name: Run test suite + run: tox r --skip-pkg-install env: PYTEST_ADDOPTS: "-vv --durations=20" CI_RUN: "yes" DIFF_AGAINST: HEAD - - name: Rename coverage report file + - if: ${{ !startsWith(matrix.py, 'pypy')}} + name: Rename coverage report file run: | import os; import sys os.rename(f".tox/.coverage.{os.environ['TOXENV']}", f".tox/.coverage.{os.environ['TOXENV']}-{sys.platform}") shell: python - - name: Upload coverage data + - if: ${{ !startsWith(matrix.py, 'pypy')}} + name: Upload coverage data uses: actions/upload-artifact@v3 with: name: coverage-data diff --git a/tox.ini b/tox.ini index 277e341b..0d21a506 100644 --- a/tox.ini +++ b/tox.ini @@ -7,7 +7,6 @@ envlist = py39 py38 py37 - pypy3 type coverage docs @@ -30,8 +29,8 @@ commands = --junitxml {toxworkdir}{/}junit.{envname}.xml --cov {envsitepackagesdir}{/}filelock --cov {toxinidir}{/}tests \ --cov-config=pyproject.toml --no-cov-on-fail --cov-report term-missing:skip-covered --cov-context=test \ --cov-report html:{envtmpdir}{/}htmlcov --cov-report xml:{toxworkdir}{/}coverage.{envname}.xml \ - tests} - diff-cover --compare-branch {env:DIFF_AGAINST:origin/main} {toxworkdir}{/}coverage.{envname}.xml + tests + diff-cover --compare-branch {env:DIFF_AGAINST:origin/main} {toxworkdir}{/}coverage.{envname}.xml} [testenv:fix] description = format the code base to adhere to our styles, and complain about what we cannot do automatically @@ -80,7 +79,6 @@ depends = py37 py38 py39 - pypy3 [testenv:docs] description = build documentation