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 #73

Merged
merged 1 commit into from
Apr 13, 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
13 changes: 10 additions & 3 deletions .github/workflows/python-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,15 @@ jobs:
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
- name: Run Tests
run: hatch run cov:test
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
- 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

docs:
runs-on: windows-latest
Expand Down Expand Up @@ -150,7 +157,7 @@ jobs:
tests_check: # This job does nothing and is only used for the branch protection
if: always()
needs:
- build
- coverage
- docs
- test_lint
- check_release
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 Events

[![Build Status](https://github.com/jupyter/jupyter_events/actions/workflows/python-tests.yml/badge.svg?query=branch%3Amain++)](https://github.com/jupyter/jupyter_events/actions/workflows/python-tests.yml/badge.svg?query=branch%3Amain++)
[![codecov](https://codecov.io/gh/jupyter/jupyter_events/branch/main/graph/badge.svg?token=S9WiBg2iL0)](https://codecov.io/gh/jupyter/jupyter_events)
[![Documentation Status](https://readthedocs.org/projects/jupyter-events/badge/?version=latest)](http://jupyter-events.readthedocs.io/en/latest/?badge=latest)

_An event system for Jupyter Applications and extensions._
Expand Down
9 changes: 0 additions & 9 deletions codecov.yml

This file was deleted.

10 changes: 6 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,9 @@ docs = [
"sphinxcontrib-spelling",
]
test = [
"coverage",
"pre-commit",
"pytest-asyncio>=0.19.0",
"pytest-console-scripts",
"pytest-cov",
"pytest>=7.0",
# [cli]
"click",
Expand All @@ -85,9 +83,9 @@ 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_events --cov-branch --cov-report term-missing:skip-covered --cov-fail-under 80 {args}"
test = "python -m pytest -vv --cov jupyter_events --cov-branch --cov-report term-missing:skip-covered {args}"
nowarn = "test -W default {args}"

[tool.hatch.envs.typing]
Expand Down Expand Up @@ -133,6 +131,10 @@ exclude_lines = [
"@(abc\\.)?abstractmethod",
]

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

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