Skip to content

Commit 0505aef

Browse files
authored
Use local coverage (#842)
1 parent aa6e43f commit 0505aef

File tree

5 files changed

+15
-14
lines changed

5 files changed

+15
-14
lines changed

.github/workflows/tests.yml

+10-3
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,15 @@ jobs:
4040
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
4141
- name: Run Tests
4242
run: hatch run cov:test
43-
- name: Upload coverage to Codecov
44-
uses: codecov/codecov-action@v3
43+
- uses: jupyterlab/maintainer-tools/.github/actions/upload-coverage@v1
44+
45+
coverage:
46+
runs-on: ubuntu-latest
47+
needs:
48+
- tests
49+
steps:
50+
- uses: actions/checkout@v3
51+
- uses: jupyterlab/maintainer-tools/.github/actions/report-coverage@v1
4552

4653
test_minimum_versions:
4754
name: Test Minimum Versions
@@ -137,7 +144,7 @@ jobs:
137144
tests_check: # This job does nothing and is only used for the branch protection
138145
if: always()
139146
needs:
140-
- tests
147+
- coverage
141148
- test_lint
142149
- test_docs
143150
- test_minimum_versions

readthedocs.yml .readthedocs.yml

File renamed without changes.

README.md

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
[![Tests](https://github.com/ipython/traitlets/actions/workflows/tests.yml/badge.svg)](https://github.com/ipython/traitlets/actions/workflows/tests.yml)
44
[![Documentation Status](https://readthedocs.org/projects/traitlets/badge/?version=latest)](https://traitlets.readthedocs.io/en/latest/?badge=latest)
5-
[![codecov](https://codecov.io/gh/ipython/traitlets/branch/main/graph/badge.svg?token=HcsbLGEmI1)](https://codecov.io/gh/ipython/traitlets)
65
[![Tidelift](https://tidelift.com/subscription/pkg/pypi-traitlets)](https://tidelift.com/badges/package/pypi/traitlets)
76

87
| | |

codecov.yml

-9
This file was deleted.

pyproject.toml

+5-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ nowarn = "test -W default {args}"
4545

4646
[tool.hatch.envs.cov]
4747
features = ["test"]
48-
dependencies = ["coverage", "pytest-cov"]
48+
dependencies = ["coverage[toml]", "pytest-cov"]
4949
[tool.hatch.envs.cov.scripts]
5050
test = "python -m pytest -vv --cov traitlets --cov-branch --cov-report term-missing:skip-covered {args}"
5151
nowarn = "test -W default {args}"
@@ -137,6 +137,10 @@ exclude_lines = [
137137
"@(abc\\.)?abstractmethod",
138138
]
139139

140+
[tool.coverage.run]
141+
relative_files = true
142+
source = ["traitlets"]
143+
140144
[tool.black]
141145
line-length = 100
142146
skip-string-normalization = true

0 commit comments

Comments
 (0)