File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -233,6 +233,7 @@ jobs:
233233 FOREVER_PAUSE : 100
234234 ITERATION_COUNT : 2
235235 TOMCAT_CYCLE_COUNT : 2
236+ CODE_COVERAGE : 1
236237 steps :
237238 - name : Checkout
238239 uses : actions/checkout@v4
@@ -259,9 +260,16 @@ jobs:
259260 if : always()
260261 with :
261262 name : Test logs
262- path : |
263- test/logs/*
263+ path : test/logs/*
264264 retention-days : 7
265+ # Preserve coverage data if defined
266+ - name : Preserve coverage files
267+ if : env.CODE_COVERAGE
268+ uses : actions/upload-artifact@v4
269+ with :
270+ name : Coverage
271+ path : test/coverage/*
272+ retention-days : 7
265273
266274 perl-tests :
267275 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