Skip to content

Commit

Permalink
Make check-workflow-run run unconditionally
Browse files Browse the repository at this point in the history
This simplifies all of the logic we have where we conditionally run
jobs even after earlier jobs have been skipped.

The current behaviour doesn't actually work, because _all_ jobs are
skipped following one job being skipped. This means
safari-stable-results-notify doesn't actually get run, because it also
gets skipped, even if the actual test runs ran successfully.
  • Loading branch information
gsnedders committed Sep 16, 2024
1 parent 7844fb5 commit 223922b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 12 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/check-workflow-run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,11 @@ jobs:
env:
GIT_PUSH_OUTPUT: ${{ runner.temp }}/git-push-output/git-push-output.txt
REFS: ${{ inputs.check-refs }}

check-workflow-run-noop:
name: "Check for appropriate epochs (noop)"
if: ${{ github.event_name != 'workflow_run' }}
runs-on:
- ubuntu-22.04
steps:
- run: exit 0
7 changes: 1 addition & 6 deletions .github/workflows/safari_stable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,8 @@ jobs:
safari-stable-results:
name: "All Tests: Safari (stable)"
needs: check-workflow-run
# We need always() here to then check for success/skipped from the
# dependency, as otherwise the skip cascades. See
# https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/using-jobs-in-a-workflow#defining-prerequisite-jobs.
if: |
always() &&
(needs.check-workflow-run.result == 'success' || needs.check-workflow-run.result == 'skipped') &&
(github.event_name != 'workflow_run' || fromJSON(needs.check-workflow-run.outputs.updated-refs)[0] != null)
github.event_name != 'workflow_run' || fromJSON(needs.check-workflow-run.outputs.updated-refs)[0] != null
runs-on:
- self-hosted
- webkit-ews
Expand Down
7 changes: 1 addition & 6 deletions .github/workflows/safari_technology_preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,8 @@ jobs:
safari-technology-preview-results:
name: "All Tests: Safari Technology Preview"
needs: check-workflow-run
# We need always() here to then check for success/skipped from the
# dependency, as otherwise the skip cascades. See
# https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/using-jobs-in-a-workflow#defining-prerequisite-jobs.
if: |
always() &&
(needs.check-workflow-run.result == 'success' || needs.check-workflow-run.result == 'skipped') &&
(github.event_name != 'workflow_run' || fromJSON(needs.check-workflow-run.outputs.updated-refs)[0] != null)
github.event_name != 'workflow_run' || fromJSON(needs.check-workflow-run.outputs.updated-refs)[0] != null
runs-on:
- self-hosted
- webkit-ews
Expand Down

0 comments on commit 223922b

Please sign in to comment.