Skip to content

Commit 584d2f0

Browse files
authored
Fix coverage handling (#392
* fix coverage handling * try without double checkout * add checkout * use relative files
1 parent 45e3262 commit 584d2f0

File tree

4 files changed

+16
-16
lines changed

4 files changed

+16
-16
lines changed

.github/workflows/tests.yml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,17 @@ jobs:
4040
- name: Run the tests on pypy
4141
if: ${{ startsWith(matrix.python-version, 'pypy') || startsWith(matrix.python-version, '3.7') }}
4242
run: hatch run cov:nowarn
43-
- name: Upload coverage
44-
run: |
45-
pip install codecov coverage[toml]
46-
codecov
43+
- uses: jupyterlab/maintainer-tools/.github/actions/upload-coverage@v1
44+
45+
coverage_report:
46+
name: Combine & check coverage
47+
needs: test
48+
runs-on: ubuntu-latest
49+
steps:
50+
- uses: actions/checkout@v3
51+
- uses: jupyterlab/maintainer-tools/.github/actions/report-coverage@v1
52+
with:
53+
fail_under: 80
4754

4855
test_lint:
4956
name: Test Lint
@@ -140,7 +147,7 @@ jobs:
140147
tests_check: # This job does nothing and is only used for the branch protection
141148
if: always()
142149
needs:
143-
- test
150+
- coverage_report
144151
- test_lint
145152
- check_links
146153
- docs

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# jupyterlab server
22

3-
[![codecov](https://codecov.io/gh/jupyterlab/jupyterlab_server/branch/main/graph/badge.svg?token=4fjcFj91Le)](https://codecov.io/gh/jupyterlab/jupyterlab_server)
43
[![Build Status](https://github.com/jupyterlab/jupyterlab_server/workflows/Tests/badge.svg?branch=master)](https://github.com/jupyterlab/jupyterlab_server/actions?query=branch%3Amaster+workflow%3A%22Tests%22)
54
[![Documentation Status](https://readthedocs.org/projects/jupyterlab_server/badge/?version=stable)](http://jupyterlab_server.readthedocs.io/en/stable/)
65

codecov.yml

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

pyproject.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ openapi = [
7070
"ruamel.yaml",
7171
]
7272
test = [
73-
"codecov",
7473
"hatch",
7574
"ipykernel",
7675
"pytest-jupyter[server]>=0.6.2",
@@ -269,3 +268,7 @@ ignore-nested-functions=true
269268
ignore-nested-classes=true
270269
fail-under=100
271270
exclude = ["tests", "docs"]
271+
272+
[tool.coverage.run]
273+
relative_files = true
274+
source = ["jupyterlab_server"]

0 commit comments

Comments
 (0)