Skip to content

Commit

Permalink
Use local coverage (#360)
Browse files Browse the repository at this point in the history
* use local coverage

* add fail_under
  • Loading branch information
blink1073 committed Apr 13, 2023
1 parent 215476b commit 633a433
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 15 deletions.
17 changes: 12 additions & 5 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,18 @@ jobs:
if: ${{ startsWith(matrix.os, 'windows') }}
run: |
hatch run cov:nowarn || hatch run test:nowarn --lf
- name: Code coverage
run: |
pip install codecov coverage[toml]
codecov
- run: hatch version 100.100.100
- uses: jupyterlab/maintainer-tools/.github/actions/upload-coverage@v1

coverage:
runs-on: ubuntu-latest
needs:
- tests
steps:
- uses: actions/checkout@v3
- uses: jupyterlab/maintainer-tools/.github/actions/report-coverage@v1
with:
fail_under: 77

test_lint:
name: Test Lint
Expand Down Expand Up @@ -147,7 +154,7 @@ jobs:
tests_check: # This job does nothing and is only used for the branch protection
if: always()
needs:
- tests
- coverage
- test_lint
- 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,6 +1,5 @@
# nbformat: Jupyter Notebook Format

[![codecov.io](https://codecov.io/github/jupyter/nbformat/coverage.svg?branch=main)](https://codecov.io/github/jupyter/nbformat/coverage.svg?branch=main)
![CI Tests](https://github.com/jupyter/nbformat/workflows/Run%20tests/badge.svg)

`nbformat` contains the reference implementation of the [Jupyter Notebook format],
Expand Down
9 changes: 0 additions & 9 deletions codecov.yml

This file was deleted.

4 changes: 4 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,10 @@ unfixable = [
# F401 `nbxml.to_notebook` imported but unused
"nbformat/*__init__.py" = ["F401"]

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

[tool.interrogate]
ignore-init-module=true
ignore-private=true
Expand Down

0 comments on commit 633a433

Please sign in to comment.