Skip to content

Commit 8144a0d

Browse files
authored
Fix coverage handling (#1257)
* fix coverage handling * use relative files * fix docs build
1 parent ca4b062 commit 8144a0d

File tree

6 files changed

+43
-68
lines changed

6 files changed

+43
-68
lines changed

.github/workflows/integration-tests.yml

-45
This file was deleted.

.github/workflows/python-tests.yml

+38-5
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,7 @@ jobs:
4646
- name: Run the tests on windows
4747
if: ${{ startsWith(matrix.os, 'windows') }}
4848
run: hatch run cov:nowarn -s || hatch run cov:nowarn --lf
49-
- name: Coverage
50-
run: |
51-
pip install codecov coverage[toml]
52-
codecov
49+
- uses: jupyterlab/maintainer-tools/.github/actions/upload-coverage@v1
5350

5451
test_docs:
5552
name: Test Docs
@@ -173,10 +170,46 @@ jobs:
173170
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
174171
- uses: jupyterlab/maintainer-tools/.github/actions/check-links@v1
175172

173+
integration_check:
174+
runs-on: ${{ matrix.os }}
175+
strategy:
176+
fail-fast: false
177+
matrix:
178+
os: [ubuntu-latest]
179+
python-version: ["3.8", "3.9", "3.10", "3.11"]
180+
steps:
181+
- uses: actions/checkout@v3
182+
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
183+
- name: Run the tests
184+
run: hatch run cov:integration
185+
- uses: jupyterlab/maintainer-tools/.github/actions/upload-coverage@v1
186+
187+
integration_check_pypy:
188+
runs-on: ubuntu-latest
189+
steps:
190+
- uses: actions/checkout@v3
191+
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
192+
with:
193+
python_version: "pypy-3.8"
194+
- name: Run the tests
195+
run: hatch run test:nowarn --integration_tests=true
196+
197+
coverage:
198+
runs-on: ubuntu-latest
199+
needs:
200+
- integration_check
201+
- build
202+
steps:
203+
- uses: actions/checkout@v3
204+
- uses: jupyterlab/maintainer-tools/.github/actions/report-coverage@v1
205+
with:
206+
fail_under: 80
207+
176208
tests_check: # This job does nothing and is only used for the branch protection
177209
if: always()
178210
needs:
179-
- build
211+
- coverage
212+
- integration_check_pypy
180213
- test_docs
181214
- test_lint
182215
- test_examples

README.md

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# Jupyter Server
22

33
[![Build Status](https://github.com/jupyter-server/jupyter_server/actions/workflows/python-tests.yml/badge.svg?query=branch%3Amain++)](https://github.com/jupyter-server/jupyter_server/actions/workflows/python-tests.yml/badge.svg?query=branch%3Amain++)
4-
[![codecov](https://codecov.io/gh/jupyter-server/jupyter_server/branch/main/graph/badge.svg?token=S9WiBg2iL0)](https://codecov.io/gh/jupyter-server/jupyter_server)
54
[![Documentation Status](https://readthedocs.org/projects/jupyter-server/badge/?version=latest)](http://jupyter-server.readthedocs.io/en/latest/?badge=latest)
65

76
The Jupyter Server provides the backend (i.e. the core services, APIs, and REST endpoints) for Jupyter web applications like Jupyter notebook, JupyterLab, and Voila.

codecov.yml

-16
This file was deleted.

docs/source/conf.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@
329329
"ipython": ("https://ipython.readthedocs.io/en/stable/", None),
330330
"nbconvert": ("https://nbconvert.readthedocs.io/en/stable/", None),
331331
"nbformat": ("https://nbformat.readthedocs.io/en/stable/", None),
332-
"jupyter_core": ("https://jupyter_core.readthedocs.io/en/stable/", None),
332+
"jupyter_core": ("https://jupyter-core.readthedocs.io/en/stable/", None),
333333
"tornado": ("https://www.tornadoweb.org/en/stable/", None),
334334
"traitlets": ("https://traitlets.readthedocs.io/en/stable/", None),
335335
}

pyproject.toml

+4
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,10 @@ exclude_lines = [
286286
"@(abc\\.)?abstractmethod",
287287
]
288288

289+
[tool.coverage.run]
290+
relative_files = true
291+
source = ["jupyter_server"]
292+
289293
[tool.jupyter-releaser.hooks]
290294
before-build-python = ["npm install", "npm run build"]
291295

0 commit comments

Comments
 (0)