File tree 1 file changed +22
-0
lines changed
1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -142,6 +142,28 @@ jobs:
142
142
mkdir -p ${{ env.CT_RESULT_DIR }}
143
143
ARCANE_CHECK=1 ctest --test-dir ${{ env.BUILD_DIR }} --output-junit ${{ env.CT_RESULT_DIR }}/results.xml ${{ env.CT_OPTS }} -E '${{ env.EXCLUDED_TESTS }}' -LE '${{ env.EXCLUDED_TESTS_WITH_LABELS }}'
144
144
145
+ # https://www.ibm.com/docs/en/developer-for-zos/9.1.1?topic=formats-junit-xml-format
146
+ - name : Edit results.xml for Codecov (need valid JUnit XML)
147
+ shell : bash
148
+ run : |
149
+ RESULT_ORI=${{ env.CT_RESULT_DIR }}/results.xml
150
+ RESULT_TMP=${{ env.CT_RESULT_DIR }}/results_ori.xml
151
+ mv $RESULT_ORI $RESULT_TMP
152
+ sed -e '/<testcase.*>/,/<\/testcase>/d' -e 's:</testsuite>::' -e 's/(empty)/CTest Arcane/' -e 's/hostname=""/hostname="GHA"/' $RESULT_TMP > $RESULT_ORI
153
+ sed -n '/<testcase.*status="fail">/,/<\/testcase>/p' $RESULT_TMP | sed -e 's:<failure message="".*/>::M' -e 's/<system-out>/<failure message="Logs Arcane:">\n/M' -e 's:</system-out>:</failure>:M' >> $RESULT_ORI
154
+ sed -n '/<testcase.*status="run">/,/<\/testcase>/p' $RESULT_TMP >> $RESULT_ORI
155
+ echo '</testsuite>' >> $RESULT_ORI
156
+ rm $RESULT_TMP
157
+
158
+ - name : Upload test results to Codecov
159
+ uses : codecov/test-results-action@v1
160
+ env :
161
+ CODECOV_TOKEN : ${{ secrets.CODECOV_TOKEN }}
162
+ with :
163
+ verbose : true
164
+ fail_ci_if_error : true
165
+ file : ${{ env.CT_RESULT_DIR }}/results.xml
166
+
145
167
- name : Display disks infos
146
168
shell : bash
147
169
run : |
You can’t perform that action at this time.
0 commit comments