Skip to content

Commit 63ff1ba

Browse files
authored
tests: fix coverage issues (#61)
Signed-off-by: Henry Schreiner <[email protected]>
1 parent 403b1dd commit 63ff1ba

File tree

3 files changed

+13
-6
lines changed

3 files changed

+13
-6
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,8 @@ jobs:
5454

5555
- uses: astral-sh/setup-uv@v3
5656

57-
- name: Install package
58-
run: uv pip install -e.[test] --system
59-
6057
- name: Test package
61-
run: pytest -ra --cov=check-sdist
58+
run: uvx nox -s coverage
6259

6360
- name: Upload coverage report
6461
uses: codecov/codecov-action@v4

noxfile.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def tests(session: nox.Session) -> None:
3434
Run the unit and regular tests.
3535
"""
3636
session.install("-e.[test]")
37-
session.run("pytest", *session.posargs)
37+
session.run("pytest", *session.posargs, env={"COVERAGE_CORE": "sysmon"})
3838

3939

4040
@nox.session
@@ -43,7 +43,13 @@ def coverage(session: nox.Session) -> None:
4343
Run tests and compute coverage.
4444
"""
4545

46-
session.posargs.append("--cov=check-sdist")
46+
session.posargs.extend(
47+
[
48+
"--cov-config=pyproject.toml",
49+
"--cov-report=xml",
50+
"--cov-report=term-missing",
51+
]
52+
)
4753
tests(session)
4854

4955

pyproject.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,10 @@ testpaths = [
7979
]
8080

8181

82+
[tool.coverage]
83+
run.source = ["check_sdist"]
84+
85+
8286
[tool.mypy]
8387
files = ["src", "tests"]
8488
python_version = "3.8"

0 commit comments

Comments
 (0)