File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -227,6 +227,7 @@ jobs:
227227 FOREVER_PAUSE : 100
228228 ITERATION_COUNT : 2
229229 TOMCAT_CYCLE_COUNT : 2
230+ CODE_COVERAGE : 1
230231 steps :
231232 - name : Checkout
232233 uses : actions/checkout@v4
@@ -253,9 +254,16 @@ jobs:
253254 if : always()
254255 with :
255256 name : Test logs
256- path : |
257- test/logs/*
257+ path : test/logs/*
258258 retention-days : 7
259+ # Preserve coverage data if defined
260+ - name : Preserve coverage files
261+ if : env.CODE_COVERAGE
262+ uses : actions/upload-artifact@v4
263+ with :
264+ name : Coverage
265+ path : test/coverage/*
266+ retention-days : 7
259267
260268 perl-tests :
261269 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