Skip to content

Commit

Permalink
ci: Compute coverage only on skore, not anymore on src/ (#1036)
Browse files Browse the repository at this point in the history
  • Loading branch information
thomass-dev committed Jan 3, 2025
1 parent d9edb1d commit b25d003
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,15 +79,15 @@ jobs:
if: ${{ ! matrix.coverage }}
timeout-minutes: 10
working-directory: skore/
run: python -m pytest -n auto --no-cov src/ tests/
run: python -m pytest -n auto src/ tests/ --no-cov

- name: Test with coverage
if: ${{ matrix.coverage }}
timeout-minutes: 10
working-directory: skore/
run: |
mkdir coverage
python -m pytest -n auto --junitxml=coverage/coverage.xml --cov=skore src/ tests/ | tee coverage/coverage.txt
python -m pytest -n auto src/ tests/ --junitxml=coverage/coverage.xml --cov | tee coverage/coverage.txt
- name: Upload coverage reports
if: ${{ matrix.coverage && (github.event_name == 'pull_request') }}
Expand Down
13 changes: 7 additions & 6 deletions skore/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,6 @@ sphinx = [
[tool.pytest.ini_options]
addopts = [
"--doctest-modules",
"--cov=src/",
"--cov=tests/",
"--cov-branch",
"--import-mode=importlib",
"--no-header",
"--verbosity=2",
Expand All @@ -116,9 +113,13 @@ addopts = [
]

[tool.coverage.run]
omit = [
"tests/*",
]
branch = true
parallel = true
source = ["skore"]

[tool.coverage.report]
omit = ["src/*", "tests/*"]
show_missing = true

[tool.ruff]
src = ["skore"]
Expand Down

0 comments on commit b25d003

Please sign in to comment.