summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Berman <Julian@GrayVines.com>2022-12-05 17:06:50 -0500
committerJulian Berman <Julian@GrayVines.com>2022-12-05 20:20:15 -0500
commita472340574cdb697638ac973bee548140ccb2db3 (patch)
treeb49a9a5ca6c4445e065492e415feab14710484a3
parent2fb7bedbc7f5a1b065bebab9ec74d0d1104dc16e (diff)
downloadjsonschema-a472340574cdb697638ac973bee548140ccb2db3.tar.gz
Replace codecov with coverage (7)'s native markdown support.
-rw-r--r--.github/workflows/ci.yml9
-rw-r--r--.github/workflows/coverage.yml25
-rw-r--r--tox.ini21
3 files changed, 19 insertions, 36 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 1636db1..1ba1125 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -122,6 +122,15 @@ jobs:
toxenv: style
- name: "3.11"
toxenv: typing
+ include:
+ - os: ubuntu-latest
+ python-version:
+ name: "3.11"
+ toxenv: py311-format-ghcoverage
+ - os: ubuntu-latest
+ python-version:
+ name: "3.11"
+ toxenv: py311-noextra-ghcoverage
exclude:
- os: windows-latest
python-version:
diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml
deleted file mode 100644
index 4af51b7..0000000
--- a/.github/workflows/coverage.yml
+++ /dev/null
@@ -1,25 +0,0 @@
-name: Coverage
-
-on:
- push:
- pull_request:
- release:
- types: [published]
-
-jobs:
- coverage:
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v3
- - name: Set up Python
- uses: actions/setup-python@v3
- with:
- python-version: "3.10"
- - name: Install tox
- run: python -m pip install tox
- - name: Collect & Upload Coverage
- # codecov.io is too flaky to fail for this right now
- continue-on-error: true
- run: python -m tox -e py310-format-codecov
- env:
- CODECOV_TOKEN: 2b38dae1-41c4-4435-a29d-79a1299e5617
diff --git a/tox.ini b/tox.ini
index eb222e2..0d104ce 100644
--- a/tox.ini
+++ b/tox.ini
@@ -11,16 +11,17 @@ skipsdist = True
[testenv]
changedir = {envtmpdir}
-passenv = CODECOV* CI PYTHONUTF8
+passenv = CI GITHUB_STEP_SUMMARY PYTHONUTF8
setenv =
JSON_SCHEMA_TEST_SUITE = {toxinidir}/json
- coverage,codecov: MAYBE_COVERAGE = coverage run -m
- coverage,codecov: COVERAGE_RCFILE={toxinidir}/.coveragerc
- coverage,codecov: COVERAGE_DEBUG_FILE={envtmpdir}/coverage-debug
- coverage,codecov: COVERAGE_FILE={envtmpdir}/coverage-data
+ coverage,ghcoverage: MAYBE_COVERAGE = coverage run -m
+ coverage,ghcoverage: COVERAGE_RCFILE={toxinidir}/.coveragerc
+ coverage,ghcoverage: COVERAGE_DEBUG_FILE={envtmpdir}/coverage-debug
+ coverage,ghcoverage: COVERAGE_FILE={envtmpdir}/coverage-data
whitelist_externals =
mkdir
+ sh
commands =
noextra: {envpython} -m pip install --disable-pip-version-check {toxinidir}
format,perf,perfsuite: {envpython} -m pip install --disable-pip-version-check '{toxinidir}[format]'
@@ -31,13 +32,12 @@ commands =
build: {envpython} -m build {toxinidir} --outdir {envtmpdir}/dist
- tests,coverage,codecov: {envpython} -Werror -m {env:MAYBE_COVERAGE:} twisted.trial {posargs:jsonschema}
+ tests,coverage,ghcoverage: {envpython} -Werror -m {env:MAYBE_COVERAGE:} twisted.trial {posargs:jsonschema}
tests: {envpython} -m doctest {toxinidir}/README.rst
coverage: {envpython} -m coverage report --show-missing
coverage: {envpython} -m coverage html --directory={envtmpdir}/htmlcov
- codecov: {envpython} -m coverage xml -o {envtmpdir}/coverage.xml
- codecov: codecov --required --disable gcov --file {envtmpdir}/coverage.xml
+ ghcoverage: sh -c "printf '### Coverage\n\n' >>$GITHUB_STEP_SUMMARY && {envpython} -m coverage report --format=markdown --show-missing >>$GITHUB_STEP_SUMMARY"
perf: {envpython} {toxinidir}/jsonschema/benchmarks/issue232.py --inherit-environ JSON_SCHEMA_TEST_SUITE {posargs:--output {envtmpdir}/bench-issue232.json}
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 =
perf,perfsuite: pyperf
- tests,coverage,codecov: twisted
+ tests,coverage,ghcoverage: twisted
- coverage,codecov: coverage
- codecov: codecov
+ coverage,ghcoverage: coverage>=7.0.0b1
[testenv:bandit]
deps = bandit