Skip to content

Commit a472340

Browse files
committed
Replace codecov with coverage (7)'s native markdown support.
1 parent 2fb7bed commit a472340

File tree

3 files changed

+19
-36
lines changed

3 files changed

+19
-36
lines changed

.github/workflows/ci.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,15 @@ jobs:
122122
toxenv: style
123123
- name: "3.11"
124124
toxenv: typing
125+
include:
126+
- os: ubuntu-latest
127+
python-version:
128+
name: "3.11"
129+
toxenv: py311-format-ghcoverage
130+
- os: ubuntu-latest
131+
python-version:
132+
name: "3.11"
133+
toxenv: py311-noextra-ghcoverage
125134
exclude:
126135
- os: windows-latest
127136
python-version:

.github/workflows/coverage.yml

Lines changed: 0 additions & 25 deletions
This file was deleted.

tox.ini

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,17 @@ skipsdist = True
1111

1212
[testenv]
1313
changedir = {envtmpdir}
14-
passenv = CODECOV* CI PYTHONUTF8
14+
passenv = CI GITHUB_STEP_SUMMARY PYTHONUTF8
1515
setenv =
1616
JSON_SCHEMA_TEST_SUITE = {toxinidir}/json
1717

18-
coverage,codecov: MAYBE_COVERAGE = coverage run -m
19-
coverage,codecov: COVERAGE_RCFILE={toxinidir}/.coveragerc
20-
coverage,codecov: COVERAGE_DEBUG_FILE={envtmpdir}/coverage-debug
21-
coverage,codecov: COVERAGE_FILE={envtmpdir}/coverage-data
18+
coverage,ghcoverage: MAYBE_COVERAGE = coverage run -m
19+
coverage,ghcoverage: COVERAGE_RCFILE={toxinidir}/.coveragerc
20+
coverage,ghcoverage: COVERAGE_DEBUG_FILE={envtmpdir}/coverage-debug
21+
coverage,ghcoverage: COVERAGE_FILE={envtmpdir}/coverage-data
2222
whitelist_externals =
2323
mkdir
24+
sh
2425
commands =
2526
noextra: {envpython} -m pip install --disable-pip-version-check {toxinidir}
2627
format,perf,perfsuite: {envpython} -m pip install --disable-pip-version-check '{toxinidir}[format]'
@@ -31,13 +32,12 @@ commands =
3132

3233
build: {envpython} -m build {toxinidir} --outdir {envtmpdir}/dist
3334

34-
tests,coverage,codecov: {envpython} -Werror -m {env:MAYBE_COVERAGE:} twisted.trial {posargs:jsonschema}
35+
tests,coverage,ghcoverage: {envpython} -Werror -m {env:MAYBE_COVERAGE:} twisted.trial {posargs:jsonschema}
3536
tests: {envpython} -m doctest {toxinidir}/README.rst
3637

3738
coverage: {envpython} -m coverage report --show-missing
3839
coverage: {envpython} -m coverage html --directory={envtmpdir}/htmlcov
39-
codecov: {envpython} -m coverage xml -o {envtmpdir}/coverage.xml
40-
codecov: codecov --required --disable gcov --file {envtmpdir}/coverage.xml
40+
ghcoverage: sh -c "printf '### Coverage\n\n' >>$GITHUB_STEP_SUMMARY && {envpython} -m coverage report --format=markdown --show-missing >>$GITHUB_STEP_SUMMARY"
4141

4242
perf: {envpython} {toxinidir}/jsonschema/benchmarks/issue232.py --inherit-environ JSON_SCHEMA_TEST_SUITE {posargs:--output {envtmpdir}/bench-issue232.json}
4343
perfsuite: {envpython} {toxinidir}/jsonschema/benchmarks/json_schema_test_suite.py --inherit-environ JSON_SCHEMA_TEST_SUITE {posargs:--output {envtmpdir}/bench-json_schema_test_suite.json}
@@ -49,10 +49,9 @@ deps =
4949

5050
perf,perfsuite: pyperf
5151

52-
tests,coverage,codecov: twisted
52+
tests,coverage,ghcoverage: twisted
5353

54-
coverage,codecov: coverage
55-
codecov: codecov
54+
coverage,ghcoverage: coverage>=7.0.0b1
5655

5756
[testenv:bandit]
5857
deps = bandit

0 commit comments

Comments
 (0)