From c64d6e72e6b6c7ad568fdb257ee39d4c2ad385e1 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Thu, 13 Apr 2023 19:00:50 -0500 Subject: [PATCH] use local coverage --- .github/workflows/test.yml | 15 ++++++++++----- README.md | 1 - codecov.yml | 9 --------- pyproject.toml | 8 +++++--- 4 files changed, 15 insertions(+), 18 deletions(-) delete mode 100644 codecov.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 03930b6..fdc9149 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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 @@ -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 diff --git a/README.md b/README.md index 6a680d5..dda4301 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/codecov.yml b/codecov.yml deleted file mode 100644 index b75c3e2..0000000 --- a/codecov.yml +++ /dev/null @@ -1,9 +0,0 @@ -coverage: - status: - project: - default: - target: auto - threshold: 1 - patch: - default: - target: 0% diff --git a/pyproject.toml b/pyproject.toml index 420dc27..7ca3bcf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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 = [ @@ -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}" @@ -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