Skip to content

Commit b471942

Browse files
committed
replace coveralls with codecov and simplify coverage setup
* remove coveralls and pytest-cov * run coverage using coverage directly
1 parent 89b0dd9 commit b471942

3 files changed

Lines changed: 12 additions & 24 deletions

File tree

.github/workflows/test.yml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,3 @@ jobs:
4141
with:
4242
parallel: true
4343
flag-name: py${{ matrix.python-version }}-${{ matrix.os }}
44-
45-
debug: true
46-
47-
coveralls_finish:
48-
needs: build-and-test
49-
runs-on: ubuntu-latest
50-
steps:
51-
- name: Coveralls Finished
52-
uses: AndreMiras/coveralls-python-action@develop
53-
with:
54-
parallel-finished: true
55-
debug: true

noxfile.py

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
from __future__ import annotations
22

3-
import os
43
import pathlib
54
import shutil
65

@@ -16,14 +15,16 @@ def test(session: nox.Session) -> None:
1615
session.install("-r", "requirements/requires.txt", "-r", "requirements/testing.txt")
1716
session.install(".", "--no-deps")
1817

19-
args = ["--cov", PROJECT, "-vvv"] + session.posargs
20-
21-
if "CI" in os.environ:
22-
args.append(f"--cov-report=xml:{ROOT.absolute()!s}/coverage.xml")
23-
session.run("pytest", *args)
24-
25-
if "CI" not in os.environ:
26-
session.run("coverage", "report", "--ignore-errors", "--show-missing")
18+
session.run(
19+
"coverage",
20+
"run",
21+
"--source=bmipy,tests",
22+
"--branch",
23+
"--module",
24+
"pytest",
25+
)
26+
session.run("coverage", "report", "--ignore-errors", "--show-missing")
27+
session.run("coverage", "xml", "-o", "coverage.xml")
2728

2829

2930
@nox.session(name="test-cli")

requirements/testing.txt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
1-
coveralls==3.3.1
2-
pytest-cov==4.1.0
3-
pytest==7.4.4
1+
coverage==7.13.5
2+
pytest==9.0.2

0 commit comments

Comments
 (0)