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

Merged
merged 3 commits 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/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,17 @@ jobs:
timeout-minutes: 15
run: |
hatch run cov:test -s || hatch run test:test -s --lf
- name: Upload 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: 75

test_lint:
name: Test Lint
Expand Down Expand Up @@ -136,7 +143,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
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

pytest plugin that checks URLs for HTML-containing files.

[![codecov](https://codecov.io/gh/jupyterlab/pytest-check-links/branch/master/graph/badge.svg)](https://codecov.io/gh/jupyterlab/pytest-check-links)
[![Tests](https://github.com/jupyterlab/pytest-check-links/workflows/Tests/badge.svg)](https://github.com/jupyterlab/pytest-check-links/actions?query=workflow%3ATests+branch%3Amaster)
[![PyPI version](https://badge.fury.io/py/pytest-check-links.svg)](https://badge.fury.io/py/pytest-check-links)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/pytest-check-links)
Expand Down
9 changes: 0 additions & 9 deletions codecov.yml

This file was deleted.

8 changes: 6 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@ nowarn = "test -W default {args}"

[tool.hatch.envs.cov]
features = ["test"]
dependencies = ["coverage", "pytest-cov"]
dependencies = ["coverage[toml]"]
[tool.hatch.envs.cov.scripts]
test = "pytest -vv --cov pytest_check_links --cov-branch --cov-report term-missing:skip-covered {args}"
test = "coverage run -m pytest {args}"
nowarn = "test -W default {args}"

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

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

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