@@ -40,15 +40,18 @@ jobs:
40
40
original_action=$(cat ./artifacts/parent-artifacts/action.txt)
41
41
original_sha=$(cat ./artifacts/parent-artifacts/sha.txt)
42
42
original_ref=$(cat ./artifacts/parent-artifacts/ref.txt)
43
+ original_conclusion=$(cat ./artifacts/parent-artifacts/conclusion.txt)
43
44
echo "original_event=$original_event" >> $GITHUB_ENV
44
45
echo "original_action=$original_action" >> $GITHUB_ENV
45
46
echo "original_sha=$original_sha" >> $GITHUB_ENV
46
47
echo "original_ref=$original_ref" >> $GITHUB_ENV
48
+ echo "original_conclusion=$original_conclusion" >> $GITHUB_ENV
47
49
48
50
echo "original_event = $original_event"
49
51
echo "original_action = $original_action"
50
52
echo "original_sha = $original_sha"
51
53
echo "original_ref = $original_ref"
54
+ echo "original_conclusion = $original_conclusion"
52
55
53
56
- name : Publish Unit Test Results
54
57
uses : EnricoMi/publish-unit-test-result-action@v2
59
62
files : ./artifacts/**/*.xml
60
63
action_fail : true
61
64
65
+ - name : Fail if tests failed
66
+ if : ${{ env.original_conclusion == 'failure' || env.original_conclusion == 'timed_out' || github.event.workflow_run.conclusion == 'failure' || github.event.workflow_run.conclusion == 'timed_out' }}
67
+ run : exit 1
68
+
62
69
- name : Clean up caches
63
70
if : always()
64
71
uses : actions/github-script@v7
@@ -120,7 +127,7 @@ jobs:
120
127
121
128
- name : Generate badge
122
129
if : ${{ !cancelled() && (env.original_event == 'schedule' || env.original_event == 'workflow_dispatch') }}
123
- uses : jaywcjlove/generated-badges@main
130
+ uses : jaywcjlove/generated-badges@v1.0.13
124
131
with :
125
132
label : Runtime Tests
126
133
status : ${{ job.status }}
@@ -132,6 +139,8 @@ jobs:
132
139
run : |
133
140
git config user.name "github-actions[bot]"
134
141
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
135
- git add --all
136
- git commit -m "Updated runtime tests badge"
137
- git push origin HEAD:gh-pages
142
+ if [[ `git status --porcelain` ]]; then
143
+ git add --all
144
+ git commit -m "Updated runtime tests badge"
145
+ git push origin HEAD:gh-pages
146
+ fi
0 commit comments