Skip to content

Commit

Permalink
chore: added coverage multiprocessing config for CI master builds and…
Browse files Browse the repository at this point in the history
… excluded stable
  • Loading branch information
jstucke committed Dec 10, 2024
1 parent ad4d6d8 commit 9a1d47e
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
18 changes: 16 additions & 2 deletions .github/workflows/build_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,26 @@ jobs:
shell: 'script -q -e -c "bash {0}"'
run: |
./src/install.py -U -R -N -L DEBUG
- name: Determine Branch
id: determine_branch
run: |
echo "branch=${GITHUB_REF#refs/heads/}" | tee -a $GITHUB_OUTPUT
- name: activate multiprocessing coverage only on master
if: steps.determine_branch.outputs.branch == 'master'
run: |
sed -i 's/"thread"/"thread", "multiprocessing"/g' pyproject.toml
- name: Unit Tests
shell: 'script -q -e -c "bash {0}"'
run: |
python3 -m pip install codecov
pytest --cov=.
if [ ${{ steps.determine_branch.outputs.branch }} == "stable" ];
then
pytest
else
python3 -m pip install codecov
pytest --cov=.
fi
- name: Upload coverage to Codecov
if: steps.determine_branch.outputs.branch != 'stable'
uses: codecov/codecov-action@v4
with:
verbose: true
Expand Down
4 changes: 4 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,15 @@ omit = [
# ignore install scripts
"src/install.py",
"src/install/*",
"src/plugins/installer.py",
"src/plugins/analysis/*/install.py",
# ignore alembic migration scripts
"src/storage/migration/**",
# ignore files only run inside docker
"src/plugins/analysis/*/docker/**",
]
concurrency = ["thread"]
parallel = true

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

0 comments on commit 9a1d47e

Please sign in to comment.