Skip to content

Commit c14b478

Browse files
authored
ci: Compute coverage only on skore, not anymore on src/ (#1036)
1 parent a8aa1da commit c14b478

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

.github/workflows/backend.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,15 +79,15 @@ jobs:
7979
if: ${{ ! matrix.coverage }}
8080
timeout-minutes: 10
8181
working-directory: skore/
82-
run: python -m pytest -n auto --no-cov src/ tests/
82+
run: python -m pytest -n auto src/ tests/ --no-cov
8383

8484
- name: Test with coverage
8585
if: ${{ matrix.coverage }}
8686
timeout-minutes: 10
8787
working-directory: skore/
8888
run: |
8989
mkdir coverage
90-
python -m pytest -n auto --junitxml=coverage/coverage.xml --cov=skore src/ tests/ | tee coverage/coverage.txt
90+
python -m pytest -n auto src/ tests/ --junitxml=coverage/coverage.xml --cov | tee coverage/coverage.txt
9191
9292
- name: Upload coverage reports
9393
if: ${{ matrix.coverage && (github.event_name == 'pull_request') }}

skore/pyproject.toml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,6 @@ sphinx = [
101101
[tool.pytest.ini_options]
102102
addopts = [
103103
"--doctest-modules",
104-
"--cov=src/",
105-
"--cov=tests/",
106-
"--cov-branch",
107104
"--import-mode=importlib",
108105
"--no-header",
109106
"--verbosity=2",
@@ -116,9 +113,13 @@ addopts = [
116113
]
117114

118115
[tool.coverage.run]
119-
omit = [
120-
"tests/*",
121-
]
116+
branch = true
117+
parallel = true
118+
source = ["skore"]
119+
120+
[tool.coverage.report]
121+
omit = ["src/*", "tests/*"]
122+
show_missing = true
122123

123124
[tool.ruff]
124125
src = ["skore"]

0 commit comments

Comments
 (0)