File tree Expand file tree Collapse file tree 3 files changed +129
-9
lines changed Expand file tree Collapse file tree 3 files changed +129
-9
lines changed Original file line number Diff line number Diff line change 1414 run : |
1515 [ ${{ steps.xunit-viewer.outputs.report-file }} == "test-reports/index.html" ]
1616 - name : Attach the report
17+ if : always()
1718 uses : actions/upload-artifact@v1
1819 with :
1920 name : test-reports
3637 run : |
3738 [ ${{ steps.xunit-viewer.outputs.report-file }} == "${{ env.RESULTS_PATH }}/index.html" ]
3839 - name : Attach the report
40+ if : always()
3941 uses : actions/upload-artifact@v1
4042 with :
4143 name : alternate-results-path-reports
5658 run : |
5759 [ ${{ steps.xunit-viewer.outputs.report-file }} == "somewhere/custom-report.html" ]
5860 - name : Attach the report
61+ if : always()
5962 uses : actions/upload-artifact@v1
6063 with :
6164 name : alternate-report-path-reports
Original file line number Diff line number Diff line change @@ -10,25 +10,28 @@ suite_success(){
1010 file=" $1 "
1111 # look for 0 failures and errors
1212 # grep reports non zero code if anything but zero failures/errors
13- suite_line=$( cat " $file " | grep " <testsuites" )
14-
15- if echo " $suite_line " | grep " failures=\" 0\" " ; then
16- if echo " $suite_line " | grep " errors=\" 0\" " ; then
17- return 0
13+ if cat " $file " | grep " <testsuites" ; then
14+ suite_line=$( cat " $file " | grep " <testsuites" )
15+ if echo " $suite_line " | grep " failures=\" 0\" " ; then
16+ if echo " $suite_line " | grep " errors=\" 0\" " ; then
17+ return 0
18+ else
19+ echo " Error found in $file : $suite_line "
20+ return 1
21+ fi
1822 else
19- echo " Error found in $file : $suite_line "
23+ echo " Failure found in $file : $suite_line "
2024 return 1
2125 fi
2226 else
23- echo " Failure found in $file : $suite_line "
24- return 1
27+ echo " Skipping file without suite: $file "
2528 fi
2629}
2730
2831echo " Inspecting '$file_or_folder '"
2932
3033if [ -d " $file_or_folder " ]; then
31- for file in $file_or_folder /* ; do suite_success " $file " ; done
34+ for file in $file_or_folder /* .xml ; do suite_success " $file " ; done
3235elif [ -f " $file_or_folder " ]; then
3336 suite_success " $file_or_folder "
3437else
Load Diff Large diffs are not rendered by default.
You can’t perform that action at this time.
0 commit comments