Skip to content

Commit 824a153

Browse files
authored
Update coverage diff to compare with main instead of develop branch (#191)
2 parents 95eff00 + 29581dd commit 824a153

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

.github/workflows/run-unittests.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ jobs:
135135
needs: test
136136
if: ${{ success() }} && ${{ github.event.issue.pull_request }}
137137
env:
138-
COMPARE_BRANCH: develop
138+
COMPARE_BRANCH: main
139139

140140
steps:
141141
- name: "Checkout current branch"
@@ -152,9 +152,14 @@ jobs:
152152
COV_BODY_INTRO="📌 Overall coverage:\n\n"
153153
echo COV_BODY="$COV_BODY_INTRO No success to gather report. 😿" >> $GITHUB_ENV
154154
155+
# Prepare file paths to .coverage files
156+
# Filenames taken from job.test last step with name - "Save coverage files"
157+
FILE_UNITARY="cov-reports-unitary/.coverage"; [[ ! -f $FILE_UNITARY ]] && FILE_UNITARY=""
158+
FILE_MODEL="cov-reports-model/.coverage"; [[ ! -f $FILE_MODEL ]] && FILE_MODEL=""
159+
155160
# Combine coverage files
156161
pip install coverage
157-
coverage combine cov-reports-unitary/.coverage cov-reports-model/.coverage
162+
coverage combine $FILE_UNITARY $FILE_MODEL
158163
159164
# Make html report
160165
coverage html

0 commit comments

Comments
 (0)