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

Use local coverage #75

Merged
merged 1 commit into from
Apr 14, 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
17 changes: 12 additions & 5 deletions .github/workflows/python-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
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 @@ -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",
Expand All @@ -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}"
Expand Down Expand Up @@ -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
Expand Down