diff --git a/.github/workflows/python-tests.yml b/.github/workflows/python-tests.yml index c0022b3..5f5727b 100644 --- a/.github/workflows/python-tests.yml +++ b/.github/workflows/python-tests.yml @@ -34,10 +34,17 @@ jobs: - name: Run the tests run: | hatch run cov:test - - name: Coverage - run: | - pip install codecov coverage[toml] - codecov + - uses: jupyterlab/maintainer-tools/.github/actions/upload-coverage@v1 + + coverage: + runs-on: ubuntu-latest + needs: + - build + steps: + - uses: actions/checkout@v3 + - uses: jupyterlab/maintainer-tools/.github/actions/report-coverage@v1 + with: + fail_under: 60 test_lint: name: Test Lint @@ -120,7 +127,7 @@ jobs: tests_check: # This job does nothing and is only used for the branch protection if: always() needs: - - build + - coverage - test_lint - test_minimum_versions - test_prereleases 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 5cf61e1..560db2f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -40,9 +40,7 @@ Tracker = "https://github.com/jupyter-server/synchronizer/issues" [project.optional-dependencies] test = [ - "coverage", "pre-commit", - "pytest-cov", "pytest-timeout", "pytest-jupyter[server]>=0.4.1", "pytest>=7.0", @@ -60,7 +58,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_synchronizer --cov-branch --cov-report term-missing:skip-covered {args}" nowarn = "test -W default {args}" @@ -114,6 +112,10 @@ exclude_lines = [ "@(abc\\.)?abstractmethod", ] +[tool.coverage.run] +relative_files = true +source = ["jupyter_server_synchronizer"] + [tool.mypy] check_untyped_defs = true disallow_any_generics = true