From 748bafb7e7953a109f7e670e17e7a6b27b0c414a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Stucke?= Date: Mon, 9 Dec 2024 15:32:00 +0100 Subject: [PATCH] chore: added coverage multiprocessing config for CI master builds --- .github/workflows/build_ci.yml | 6 +++++- pyproject.toml | 3 +++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_ci.yml b/.github/workflows/build_ci.yml index 51d9ad4f6..ad97e36f3 100644 --- a/.github/workflows/build_ci.yml +++ b/.github/workflows/build_ci.yml @@ -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: diff --git a/pyproject.toml b/pyproject.toml index 49e2d6ea0..97f01800b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -107,6 +107,7 @@ docstring-quotes = "double" quote-style = "single" [tool.coverage.run] +source = ["src"] omit = [ # ignore install scripts "src/install.py", @@ -116,6 +117,8 @@ omit = [ # ignore files only run inside docker "src/plugins/analysis/*/docker/**", ] +multiprocessing = ["thread"] +parallel = true [tool.coverage.report] exclude_also = [