Skip to content

Commit c51b0d8

Browse files
authored
Merge pull request #1025 from python-jsonschema/ghcoverage
Replace codecov with coverage (7)'s native markdown support
2 parents 09b28bb + a472340 commit c51b0d8

File tree

3 files changed

+25
-43
lines changed

3 files changed

+25
-43
lines changed

.github/workflows/ci.yml

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,17 @@ jobs:
2626
matrix:
2727
os: [macos-latest, ubuntu-latest, windows-latest]
2828
python-version:
29-
- name: pypy-3.8
29+
- name: pypy-3.9
3030
toxenv: pypy3-noextra-build
31-
- name: pypy-3.8
31+
- name: pypy-3.9
3232
toxenv: pypy3-noextra-tests
33-
- name: pypy-3.8
33+
- name: pypy-3.9
3434
toxenv: pypy3-format-build
35-
- name: pypy-3.8
35+
- name: pypy-3.9
3636
toxenv: pypy3-format-tests
37-
- name: pypy-3.8
37+
- name: pypy-3.9
3838
toxenv: pypy3-formatnongpl-build
39-
- name: pypy-3.8
39+
- name: pypy-3.9
4040
toxenv: pypy3-formatnongpl-tests
4141
- name: 3.7
4242
toxenv: py37-noextra-build
@@ -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 & 12 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,14 +32,12 @@ commands =
3132

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

34-
# Ignore the deprecation warning until pypa/setuptools#3276 is released
35-
tests,coverage,codecov: {envpython} -Werror -W"ignore:module 'sre_constants' is deprecated:DeprecationWarning" -m {env:MAYBE_COVERAGE:} twisted.trial {posargs:jsonschema}
35+
tests,coverage,ghcoverage: {envpython} -Werror -m {env:MAYBE_COVERAGE:} twisted.trial {posargs:jsonschema}
3636
tests: {envpython} -m doctest {toxinidir}/README.rst
3737

3838
coverage: {envpython} -m coverage report --show-missing
3939
coverage: {envpython} -m coverage html --directory={envtmpdir}/htmlcov
40-
codecov: {envpython} -m coverage xml -o {envtmpdir}/coverage.xml
41-
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"
4241

4342
perf: {envpython} {toxinidir}/jsonschema/benchmarks/issue232.py --inherit-environ JSON_SCHEMA_TEST_SUITE {posargs:--output {envtmpdir}/bench-issue232.json}
4443
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}
@@ -50,10 +49,9 @@ deps =
5049

5150
perf,perfsuite: pyperf
5251

53-
tests,coverage,codecov: twisted
52+
tests,coverage,ghcoverage: twisted
5453

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

5856
[testenv:bandit]
5957
deps = bandit

0 commit comments

Comments
 (0)