Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix coverage handling #1257

Merged
merged 3 commits into from
Apr 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 0 additions & 45 deletions .github/workflows/integration-tests.yml

This file was deleted.

43 changes: 38 additions & 5 deletions .github/workflows/python-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,7 @@ jobs:
- name: Run the tests on windows
if: ${{ startsWith(matrix.os, 'windows') }}
run: hatch run cov:nowarn -s || hatch run cov:nowarn --lf
- name: Coverage
run: |
pip install codecov coverage[toml]
codecov
- uses: jupyterlab/maintainer-tools/.github/actions/upload-coverage@v1

test_docs:
name: Test Docs
Expand Down Expand Up @@ -173,10 +170,46 @@ jobs:
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
- uses: jupyterlab/maintainer-tools/.github/actions/check-links@v1

integration_check:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: ["3.8", "3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v3
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
- name: Run the tests
run: hatch run cov:integration
- uses: jupyterlab/maintainer-tools/.github/actions/upload-coverage@v1

integration_check_pypy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
with:
python_version: "pypy-3.8"
- name: Run the tests
run: hatch run test:nowarn --integration_tests=true

coverage:
runs-on: ubuntu-latest
needs:
- integration_check
- build
steps:
- uses: actions/checkout@v3
- uses: jupyterlab/maintainer-tools/.github/actions/report-coverage@v1
with:
fail_under: 80

tests_check: # This job does nothing and is only used for the branch protection
if: always()
needs:
- build
- coverage
- integration_check_pypy
- test_docs
- test_lint
- test_examples
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Jupyter Server

[![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++)
[![codecov](https://codecov.io/gh/jupyter-server/jupyter_server/branch/main/graph/badge.svg?token=S9WiBg2iL0)](https://codecov.io/gh/jupyter-server/jupyter_server)
[![Documentation Status](https://readthedocs.org/projects/jupyter-server/badge/?version=latest)](http://jupyter-server.readthedocs.io/en/latest/?badge=latest)

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.
Expand Down
16 changes: 0 additions & 16 deletions codecov.yml

This file was deleted.

2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@
"ipython": ("https://ipython.readthedocs.io/en/stable/", None),
"nbconvert": ("https://nbconvert.readthedocs.io/en/stable/", None),
"nbformat": ("https://nbformat.readthedocs.io/en/stable/", None),
"jupyter_core": ("https://jupyter_core.readthedocs.io/en/stable/", None),
"jupyter_core": ("https://jupyter-core.readthedocs.io/en/stable/", None),
"tornado": ("https://www.tornadoweb.org/en/stable/", None),
"traitlets": ("https://traitlets.readthedocs.io/en/stable/", None),
}
Expand Down
4 changes: 4 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,10 @@ exclude_lines = [
"@(abc\\.)?abstractmethod",
]

[tool.coverage.run]
relative_files = true
source = ["jupyter_server"]

[tool.jupyter-releaser.hooks]
before-build-python = ["npm install", "npm run build"]

Expand Down