Skip to content

Commit

Permalink
Use local coverage (#842)
Browse files Browse the repository at this point in the history
  • Loading branch information
blink1073 committed Apr 13, 2023
1 parent aa6e43f commit 0505aef
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 14 deletions.
13 changes: 10 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,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:
- tests
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 @@ -137,7 +144,7 @@ jobs:
tests_check: # This job does nothing and is only used for the branch protection
if: always()
needs:
- tests
- coverage
- test_lint
- test_docs
- test_minimum_versions
Expand Down
File renamed without changes.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

[![Tests](https://github.com/ipython/traitlets/actions/workflows/tests.yml/badge.svg)](https://github.com/ipython/traitlets/actions/workflows/tests.yml)
[![Documentation Status](https://readthedocs.org/projects/traitlets/badge/?version=latest)](https://traitlets.readthedocs.io/en/latest/?badge=latest)
[![codecov](https://codecov.io/gh/ipython/traitlets/branch/main/graph/badge.svg?token=HcsbLGEmI1)](https://codecov.io/gh/ipython/traitlets)
[![Tidelift](https://tidelift.com/subscription/pkg/pypi-traitlets)](https://tidelift.com/badges/package/pypi/traitlets)

| | |
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 @@ -45,7 +45,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 traitlets --cov-branch --cov-report term-missing:skip-covered {args}"
nowarn = "test -W default {args}"
Expand Down Expand Up @@ -137,6 +137,10 @@ exclude_lines = [
"@(abc\\.)?abstractmethod",
]

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

[tool.black]
line-length = 100
skip-string-normalization = true
Expand Down

0 comments on commit 0505aef

Please sign in to comment.