File tree Expand file tree Collapse file tree 2 files changed +13
-2
lines changed
Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -223,6 +223,7 @@ jobs:
223223 FOREVER_PAUSE : 100
224224 ITERATION_COUNT : 2
225225 TOMCAT_CYCLE_COUNT : 2
226+ CODE_COVERAGE : 1
226227 steps :
227228 - name : Checkout
228229 uses : actions/checkout@v4
@@ -249,9 +250,16 @@ jobs:
249250 if : always()
250251 with :
251252 name : Test logs
252- path : |
253- test/logs/*
253+ path : test/logs/*
254254 retention-days : 7
255+ # Preserve coverage data if defined
256+ - name : Preserve coverage files
257+ if : env.CODE_COVERAGE
258+ uses : actions/upload-artifact@v4
259+ with :
260+ name : Coverage
261+ path : test/coverage/*
262+ retention-days : 7
255263
256264 perl-tests :
257265 runs-on : ubuntu-latest
Original file line number Diff line number Diff line change @@ -128,11 +128,14 @@ if [ $CODE_COVERAGE ]; then
128128 echo " Generating test coverage..."
129129 httpd_start > /dev/null 2>&1
130130 docker exec $MPC_NAME /usr/local/apache2/bin/apachectl stop
131+
131132 for f in $( ls coverage/* .json) ; do
132133 docker cp -q $f $MPC_NAME :/coverage/
133134 done
135+
134136 docker exec $MPC_NAME sh -c ' cd /native; gcovr --add-tracefile "/coverage/coverage-*.json" --html-details /coverage/test-coverage.html'
135137 docker cp $MPC_NAME :/coverage/ .
138+
136139 httpd_remove
137140fi
138141
You can’t perform that action at this time.
0 commit comments