|
18 | 18 | environment: ui-test |
19 | 19 | if: > |
20 | 20 | github.event.workflow_run.event == 'pull_request' |
21 | | - && github.event.workflow_run.conclusion != 'cancelled' |
22 | | - && github.event.workflow_run.conclusion != 'skipped' |
| 21 | + && github.event.workflow_run.conclusion == 'success' |
23 | 22 | permissions: |
24 | 23 | id-token: write # Needed for OIDC authentication |
25 | 24 | actions: read # Needed for retrieving artifacts |
|
87 | 86 | echo "job_url=$JOB_URL" |
88 | 87 | } >> "$GITHUB_OUTPUT" |
89 | 88 |
|
90 | | - # Halt before spending any emulator.wtf credits if the triggering Pull Request |
91 | | - # workflow did not succeed (publish_test_results still runs afterward to |
92 | | - # aggregate whatever results pr.yml produced). |
93 | | - - name: Halt if triggering workflow did not succeed |
94 | | - if: github.event.workflow_run.conclusion != 'success' |
95 | | - env: |
96 | | - CONCLUSION: ${{ github.event.workflow_run.conclusion }} |
97 | | - run: | |
98 | | - echo "::error::Triggering 'Pull Request' workflow concluded as '$CONCLUSION'; skipping emulator.wtf to save resources" |
99 | | - exit 1 |
100 | | -
|
101 | 89 | - name: Download emulator.wtf inputs |
102 | 90 | uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 |
103 | 91 | with: |
@@ -164,7 +152,7 @@ jobs: |
164 | 152 | name: Instrumentation Test app reports |
165 | 153 | path: build/test-results/** |
166 | 154 |
|
167 | | - # job.status reflects everything above (halt, downloads, test runs) and is |
| 155 | + # job.status reflects everything above (check creation, downloads, test runs) and is |
168 | 156 | # one of success/failure/cancelled, all valid check-run conclusions. |
169 | 157 | # We re-send the same output.summary link so the completed check page |
170 | 158 | # keeps the deep-link to the emulator.wtf job logs (see the Create step |
@@ -207,11 +195,12 @@ jobs: |
207 | 195 | github-token: ${{ secrets.GITHUB_TOKEN }} |
208 | 196 | path: pr-artifacts |
209 | 197 |
|
210 | | - # If emulator_wtf halted or failed before running tests, it uploads no |
211 | | - # results artifact, and downloading it by name errors. Tolerate that so we |
212 | | - # still publish the pr.yml results below. We cannot gate on |
213 | | - # needs.emulator_wtf.result because a real test failure also fails the job |
214 | | - # yet does produce this artifact, which we must still publish. |
| 198 | + # If emulator_wtf was skipped (non-PR trigger or triggering workflow did not succeed) or |
| 199 | + # cancelled/failed before running tests, it uploads no results artifact, and |
| 200 | + # downloading it by name errors. Tolerate that so we still publish the |
| 201 | + # pr.yml results below. We cannot gate on needs.emulator_wtf.result because |
| 202 | + # a real test failure also fails the job yet does produce this artifact, |
| 203 | + # which we must still publish. |
215 | 204 | - name: Download emulator.wtf results from this run |
216 | 205 | continue-on-error: true |
217 | 206 | uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 |
|
0 commit comments