Skip to content

Commit

Permalink
Use local coverage (#80)
Browse files Browse the repository at this point in the history
  • Loading branch information
blink1073 authored Apr 14, 2023
1 parent 6758b29 commit 4b799d6
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 18 deletions.
15 changes: 10 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,15 @@ jobs:
if: ${{ !startsWith(matrix.python-version, 'pypy') }}
run: |
hatch run cov:test --cov-fail-under 75 || hatch run test:test --lf
- name: Coverage
run: |
pip install codecov coverage[toml]
codecov
- uses: jupyterlab/maintainer-tools/.github/actions/upload-coverage@v1

coverage:
runs-on: ubuntu-latest
needs:
- test
steps:
- uses: actions/checkout@v3
- uses: jupyterlab/maintainer-tools/.github/actions/report-coverage@v1

test_docs:
name: Test Docs
Expand Down Expand Up @@ -138,7 +143,7 @@ jobs:
tests_check: # This job does nothing and is only used for the branch protection
if: always()
needs:
- test
- coverage
- test_lint
- test_docs
- test_minimum_versions
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 Terminals

[![Build Status](https://github.com/jupyter-server/jupyter_server_terminals/actions/workflows/test.yml/badge.svg?query=branch%3Amain++)](https://github.com/jupyter-server/jupyter_server_terminals/actions?query=branch%3Amain++)
[![codecov](https://codecov.io/gh/jupyter-server/jupyter_server_terminals/branch/main/graph/badge.svg?token=6OPBSEMMUG)](https://codecov.io/gh/jupyter-server/jupyter_server_terminals)
[![Documentation Status](https://readthedocs.org/projects/jupyter-server-terminals/badge/?version=latest)](http://jupyter-server-terminals.readthedocs.io/en/latest/?badge=latest)

Jupyter Server Terminals is a Jupyter Server Extension providing support for terminals.
Expand Down
9 changes: 0 additions & 9 deletions codecov.yml

This file was deleted.

8 changes: 5 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,9 @@ Homepage = "https://jupyter.org"

[project.optional-dependencies]
test = [
"coverage",
"jupyter_server>=2.0.0",
"pytest-jupyter[server]>=0.5.3",
"pytest>=7.0",
"pytest-cov",
"pytest-timeout",
]
docs = [
Expand Down Expand Up @@ -76,7 +74,7 @@ nowarn = "test -W default {args}"

[tool.hatch.envs.cov]
features = ["test"]
dependencies = ["coverage", "pytest-cov"]
dependencies = ["coverage[toml]", "pytest-cov"]
[tool.hatch.envs.cov.scripts]
test = "python -m pytest -vv --cov jupyter_server_terminals --cov-branch --cov-report term-missing:skip-covered {args}"
nowarn = "test -W default {args}"
Expand Down Expand Up @@ -123,6 +121,10 @@ filterwarnings = [
"module:Jupyter is migrating its paths to use standard platformdirs:DeprecationWarning",
]

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

[tool.mypy]
check_untyped_defs = true
disallow_any_generics = true
Expand Down

0 comments on commit 4b799d6

Please sign in to comment.