diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index cf630c3e3..0f14f3c1e 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -14,7 +14,7 @@ jobs: py: "3.9" runs-on: ubuntu-latest - name: "Run '${{ matrix.toxenv }}' on python ${{ matrix.py }}" + name: "'${{ matrix.toxenv }}' on py${{ matrix.py }}" steps: - uses: actions/checkout@v4 @@ -61,10 +61,10 @@ jobs: ci-test-matrix: strategy: matrix: - os: [ubuntu-latest, windows-latest, macos-latest] + os: [ubuntu, windows, macos] py: ['3.9', '3.10', '3.11', '3.12', '3.13'] - name: "Run tests on ${{ matrix.os }}, py${{ matrix.py }}" - runs-on: ${{ matrix.os }} + name: "Test on ${{ matrix.os }}, py${{ matrix.py }}" + runs-on: "${{ matrix.os }}-latest" steps: - uses: actions/checkout@v4 @@ -98,7 +98,7 @@ jobs: - name: test run: | python -m tox run -m ci -- --junitxml pytest.{envname}.xml - python -m tox run -e cov + python -m tox run -e cov_combine,cov_report - uses: actions/upload-artifact@v4 with: diff --git a/tox.ini b/tox.ini index 6edec916f..115d46171 100644 --- a/tox.ini +++ b/tox.ini @@ -6,7 +6,8 @@ envlist = py{313,312,311,310,39} py{39,313}-{json5,pyjson5}{,-format} py{39,313}-{disable_orjson} - cov + cov_combine + cov_report skip_missing_interpreters = true minversion = 4.0.0 @@ -39,13 +40,19 @@ skip_install = true commands = coverage erase depends = -[testenv:cov] -description = "combine and report coverage data" +[testenv:cov_combine] +description = "combine coverage data" +deps = coverage +skip_install = true +commands = coverage combine +depends = py{,38,39,310,311,312,313}{,-mindeps,-format,-json5,-pyjson5,-disable_orjson} + +[testenv:cov_report] +description = "report test coverage" deps = coverage skip_install = true -commands_pre = - coverage combine commands = coverage report --skip-covered -depends = py{,38,39,310,311,312}{,-mindeps,-format,-json5,-pyjson5,-disable_orjson} +depends = cov_combine [testenv:mypy] description = "check type annotations with mypy"