Skip to content

Commit d12381a

Browse files
authored
Minor CI and test config improvements (#533)
* Fix tox coverage config Run coverage after py3.13 tests, and combine+report in separate steps to get simpler reporting semantics when using `tox p`. * Improve CI job names
1 parent e541734 commit d12381a

File tree

2 files changed

+17
-10
lines changed

2 files changed

+17
-10
lines changed

.github/workflows/build.yaml

+5-5
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
py: "3.9"
1515

1616
runs-on: ubuntu-latest
17-
name: "Run '${{ matrix.toxenv }}' on python ${{ matrix.py }}"
17+
name: "'${{ matrix.toxenv }}' on py${{ matrix.py }}"
1818
steps:
1919
- uses: actions/checkout@v4
2020

@@ -61,10 +61,10 @@ jobs:
6161
ci-test-matrix:
6262
strategy:
6363
matrix:
64-
os: [ubuntu-latest, windows-latest, macos-latest]
64+
os: [ubuntu, windows, macos]
6565
py: ['3.9', '3.10', '3.11', '3.12', '3.13']
66-
name: "Run tests on ${{ matrix.os }}, py${{ matrix.py }}"
67-
runs-on: ${{ matrix.os }}
66+
name: "Test on ${{ matrix.os }}, py${{ matrix.py }}"
67+
runs-on: "${{ matrix.os }}-latest"
6868
steps:
6969
- uses: actions/checkout@v4
7070

@@ -98,7 +98,7 @@ jobs:
9898
- name: test
9999
run: |
100100
python -m tox run -m ci -- --junitxml pytest.{envname}.xml
101-
python -m tox run -e cov
101+
python -m tox run -e cov_combine,cov_report
102102
103103
- uses: actions/upload-artifact@v4
104104
with:

tox.ini

+12-5
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ envlist =
66
py{313,312,311,310,39}
77
py{39,313}-{json5,pyjson5}{,-format}
88
py{39,313}-{disable_orjson}
9-
cov
9+
cov_combine
10+
cov_report
1011
skip_missing_interpreters = true
1112
minversion = 4.0.0
1213

@@ -39,13 +40,19 @@ skip_install = true
3940
commands = coverage erase
4041
depends =
4142

42-
[testenv:cov]
43-
description = "combine and report coverage data"
43+
[testenv:cov_combine]
44+
description = "combine coverage data"
45+
deps = coverage
46+
skip_install = true
47+
commands = coverage combine
48+
depends = py{,38,39,310,311,312,313}{,-mindeps,-format,-json5,-pyjson5,-disable_orjson}
49+
50+
[testenv:cov_report]
51+
description = "report test coverage"
4452
deps = coverage
4553
skip_install = true
46-
commands_pre = - coverage combine
4754
commands = coverage report --skip-covered
48-
depends = py{,38,39,310,311,312}{,-mindeps,-format,-json5,-pyjson5,-disable_orjson}
55+
depends = cov_combine
4956

5057
[testenv:mypy]
5158
description = "check type annotations with mypy"

0 commit comments

Comments
 (0)