Skip to content

Commit

Permalink
Use local coverage (#281)
Browse files Browse the repository at this point in the history
  • Loading branch information
blink1073 authored Apr 14, 2023
1 parent b62adb8 commit 3646f68
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 16 deletions.
14 changes: 9 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,15 @@ jobs:
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
- name: Run the tests
run: hatch run cov:test || hatch run test:test --lf
- uses: jupyterlab/maintainer-tools/.github/actions/upload-coverage@v1

- name: Upload coverage to Codecov
run: |
pip install codecov coverage[toml]
codecov
coverage:
runs-on: ubuntu-latest
needs:
- build
steps:
- uses: actions/checkout@v3
- uses: jupyterlab/maintainer-tools/.github/actions/report-coverage@v1

test_minimum_versions:
name: Test Minimum Versions
Expand Down Expand Up @@ -126,7 +130,7 @@ jobs:
tests_check: # This job does nothing and is only used for the branch protection
if: always()
needs:
- build
- 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 @@
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/jupyter/nbclient/main?filepath=binder%2Frun_nbclient.ipynb)
[![Build Status](https://github.com/jupyter/nbclient/workflows/CI/badge.svg)](https://github.com/jupyter/nbclient/actions)
[![Documentation Status](https://readthedocs.org/projects/nbclient/badge/?version=latest)](https://nbclient.readthedocs.io/en/latest/?badge=latest)
[![CodeCov](https://codecov.io/gh/jupyter/nbclient/coverage.svg?branch=main)](https://codecov.io/gh/jupyter/nbclient?branch=main)
[![Python 3.7](https://img.shields.io/badge/python-3.7-blue.svg)](https://www.python.org/downloads/release/python-370/)
[![Python 3.8](https://img.shields.io/badge/python-3.8-blue.svg)](https://www.python.org/downloads/release/python-380/)
[![Python 3.9](https://img.shields.io/badge/python-3.9-blue.svg)](https://www.python.org/downloads/release/python-390/)
Expand Down
9 changes: 0 additions & 9 deletions codecov.yml

This file was deleted.

6 changes: 5 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,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 nbclient --cov-branch --cov-report term-missing:skip-covered {args}"
nowarn = "test -W default {args}"
Expand Down Expand Up @@ -156,6 +156,10 @@ exclude_lines = [
"@(abc\\.)?abstractmethod",
]

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

[tool.mypy]
python_version = 3.9
check_untyped_defs = true
Expand Down

0 comments on commit 3646f68

Please sign in to comment.