Skip to content

Commit

Permalink
Fix coverage handling (#1257)
Browse files Browse the repository at this point in the history
* fix coverage handling

* use relative files

* fix docs build
  • Loading branch information
blink1073 authored Apr 13, 2023
1 parent ca4b062 commit 8144a0d
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 68 deletions.
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

0 comments on commit 8144a0d

Please sign in to comment.