Skip to content

Commit

Permalink
chore: added coverage multiprocessing config for CI master builds
Browse files Browse the repository at this point in the history
  • Loading branch information
jstucke committed Dec 9, 2024
1 parent ad4d6d8 commit 217608c
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/build_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,11 @@ jobs:
shell: 'script -q -e -c "bash {0}"'
run: |
python3 -m pip install codecov
pytest --cov=.
if [ $(git rev-parse --abbrev-ref HEAD) == "master" ];
then # run coverage with multiprocessing but only for the daily master build (for performance reasons)
sed -i 's/"thread"/"thread", "multiprocessing"/g' pyproject.toml
fi
pytest --cov
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
Expand Down
5 changes: 5 additions & 0 deletions .multiproc-coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
; this coverage config file is only for master builds on the CI
; for all other CI builds it is disabled by default (due to massive performance hits)
[run]
concurrency = multiprocessing
parallel = True
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ docstring-quotes = "double"
quote-style = "single"

[tool.coverage.run]
source = "src"
omit = [
# ignore install scripts
"src/install.py",
Expand All @@ -116,6 +117,8 @@ omit = [
# ignore files only run inside docker
"src/plugins/analysis/*/docker/**",
]
multiprocessing = ["thread"]
parallel = true

[tool.coverage.report]
exclude_also = [
Expand Down

0 comments on commit 217608c

Please sign in to comment.