Last active
May 7, 2021 00:41
-
-
Save kf6kjg/31b80cf0f8c9997ddc7fe7335c580412 to your computer and use it in GitHub Desktop.
Demonstrates failure behaviors in GitHub Actions Workflows
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Test results | |
# If a "workflow run" that is in the pending state is cancelled, then no jobs in that "workflow run" will execute - doesn't matter what their if condition is. | |
# If a "workflow run" that is in the running state is cancelled, then: | |
# 1. All jobs that are in the Running state will be stopped and anything that's actively being executed will be killed wherever they are in their execution. This can leave external services in an inconsistent state unless you actively handle it. | |
# 2. Any jobs that are conditional on the `cancelled()` status function will have their condition checked and if true will then execute. | |
# The remaining "workflow run" states are unaffected by cancellation as the run is already terminated: Cancelled, Failure, and Success. | |
# Jobs can terminate with the following states: | |
# * cancelled - meaning that at some point in the job somthing cancelled the workflow run, whether human or machine. E.g. if the workflow run was aborted via the concurrency cancel-in-progress flag being true, or a user hit the "Cancel workflow" button. | |
# * failure - meaning that at least one step in the job, that did not have continue-on-error set true, failed - i.e returned a non-zero exit code. | |
# * skipped - meaning that the if condition for the job evaluated to false. Since jobs have a default condition, see below, this will cause further jobs to be skipped by default. | |
# * success - meaning all steps in the job either succeeded or they had continue-on-error set true. | |
# Jobs that don't specify a status check function evaulate as `if: success() && (your conditions)` | |
# Thus jobs without an if condition uses same logic as `if: success()`. | |
# if: always() - Runs the job absolutely unconditionally. | |
# if: cancelled() - Only runs the job if the user or concurrency system cancels the workflow. Needed jobs being skipped or not doesn't change behavior. | |
# if: failure() - Runs the job if any or all needed jobs failed AND the workflow was not cancelled. If all needed jobs succeeded this task is skipped. Needed jobs being skipped or not doesn't change behavior. | |
# if: success() - Runs the job only if all needed jobs succeed - if any are skipped the job is also skipped. | |
# if: failure() || cancelled() - Runs the job if any or all needed jobs failed OR the workflow was cancelled. Needed jobs being skipped or not doesn't change behavior. | |
# if: always() && (failure() || cancelled()) - Same as `failure() || cancelled()` - this seems obvious, but needed to be verified. | |
# if: success() && !(failure() || cancelled()) - Same as `success()` | |
# if: success() || !(failure() || cancelled()) - Same as `!(failure() || cancelled())` | |
# if: !(failure() || cancelled()) - Runs the job only if all needed jobs succeed or are skipped. | |
# When parallel jobs all succeed then the value of needs.parallel-?.outputs.atLeastOneJobSucceeded was 'true' | |
# When one parallel job succeeds, no matter the order or quantity, the value of needs.parallel-?.outputs.atLeastOneJobSucceeded was 'true' | |
# With `matrix.jobId >= 1`, aka most fail, the value of needs.parallel-?.outputs.atLeastOneJobSucceeded was 'true' | |
# With `matrix.jobId >= 0`, aka all fail, the value of needs.parallel-?.outputs.atLeastOneJobSucceeded was blank | |
# The value of needs.parallel-?.outputs.jobId is dependent on which job ran last. | |
# Each parallel job can start a random time, and depending on the processes involved take different amounts of time, thus there's no way to know up front which one will end last every time. | |
# The tests below attempt to sequence the parallel job end-of-execution time, but since that's an offset from the start-of-job time there's a wild amount of inaccuracy. | |
name: TESTING | |
concurrency: | |
cancel-in-progress: true | |
group: testing | |
on: | |
push: | |
branches: | |
- testing | |
jobs: | |
unneeded_failure: # Doesn't affect any other job in the workflow. | |
runs-on: ubuntu-20.04 | |
steps: | |
- run: exit 1 | |
parallel-all-succeeded: | |
name: Step 1.${{ matrix.jobId }} | |
runs-on: ubuntu-20.04 | |
strategy: | |
matrix: | |
jobId: [0, 1] | |
steps: | |
- id: prefailure | |
run: echo "::set-output name=jobId::Job ID ${{ matrix.jobId }}" | |
- run: sleep $(( 5 * ${{ matrix.jobId }} )) | |
- if: matrix.jobId < 0 | |
run: exit 1 | |
- id: job | |
run: echo "::set-output name=success::true" | |
outputs: | |
atLeastOneJobSucceeded: ${{ steps.job.outputs.success }} | |
jobId: ${{ steps.prefailure.outputs.jobId }} | |
parallel-first-failed: | |
name: Step 1.${{ matrix.jobId }} | |
runs-on: ubuntu-20.04 | |
strategy: | |
matrix: | |
jobId: [0, 1] | |
steps: | |
- id: prefailure | |
run: echo "::set-output name=jobId::Job ID ${{ matrix.jobId }}" | |
- if: matrix.jobId == 0 | |
run: exit 1 | |
- id: job | |
run: echo "::set-output name=success::true" | |
outputs: | |
atLeastOneJobSucceeded: ${{ steps.job.outputs.success }} | |
jobId: ${{ steps.prefailure.outputs.jobId }} | |
parallel-last-failed: | |
name: Step 1.${{ matrix.jobId }} | |
runs-on: ubuntu-20.04 | |
strategy: | |
matrix: | |
jobId: [0, 1] | |
steps: | |
- id: prefailure | |
run: echo "::set-output name=jobId::Job ID ${{ matrix.jobId }}" | |
- run: sleep $(( 5 * ${{ matrix.jobId }} )) | |
- if: matrix.jobId == 1 | |
run: exit 1 | |
- id: job | |
run: echo "::set-output name=success::true" | |
outputs: | |
atLeastOneJobSucceeded: ${{ steps.job.outputs.success }} | |
jobId: ${{ steps.prefailure.outputs.jobId }} | |
sleep: | |
runs-on: ubuntu-20.04 | |
steps: | |
- run: sleep 30 | |
readout-pAll: | |
needs: | |
- parallel-all-succeeded | |
- sleep | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Read parallel output | |
run: | | |
echo "atLeastOneJobSucceeded=${{ needs.parallel-all-succeeded.outputs.atLeastOneJobSucceeded }}" | |
echo "jobId=${{ needs.parallel-all-succeeded.outputs.jobId }}" | |
readout-pAll-always: | |
if: always() | |
needs: | |
- parallel-all-succeeded | |
- sleep | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Read parallel output | |
run: | | |
echo "atLeastOneJobSucceeded=${{ needs.parallel-all-succeeded.outputs.atLeastOneJobSucceeded }}" | |
echo "jobId=${{ needs.parallel-all-succeeded.outputs.jobId }}" | |
readout-pAll-cancelled: | |
if: cancelled() | |
needs: | |
- parallel-all-succeeded | |
- sleep | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Read parallel output | |
run: | | |
echo "atLeastOneJobSucceeded=${{ needs.parallel-all-succeeded.outputs.atLeastOneJobSucceeded }}" | |
echo "jobId=${{ needs.parallel-all-succeeded.outputs.jobId }}" | |
readout-pAll-failure: | |
if: failure() | |
needs: | |
- parallel-all-succeeded | |
- sleep | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Read parallel output | |
run: | | |
echo "atLeastOneJobSucceeded=${{ needs.parallel-all-succeeded.outputs.atLeastOneJobSucceeded }}" | |
echo "jobId=${{ needs.parallel-all-succeeded.outputs.jobId }}" | |
readout-pAll-success: | |
if: success() | |
needs: | |
- parallel-all-succeeded | |
- sleep | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Read parallel output | |
run: | | |
echo "atLeastOneJobSucceeded=${{ needs.parallel-all-succeeded.outputs.atLeastOneJobSucceeded }}" | |
echo "jobId=${{ needs.parallel-all-succeeded.outputs.jobId }}" | |
readout-pAll-failureOrCancelled: | |
if: failure() || cancelled() | |
needs: | |
- parallel-all-succeeded | |
- sleep | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Read parallel output | |
run: | | |
echo "atLeastOneJobSucceeded=${{ needs.parallel-all-succeeded.outputs.atLeastOneJobSucceeded }}" | |
echo "jobId=${{ needs.parallel-all-succeeded.outputs.jobId }}" | |
readout-pAll-alwaysAndFailureOrCancelled: | |
if: always() && (failure() || cancelled()) | |
needs: | |
- parallel-all-succeeded | |
- sleep | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Read parallel output | |
run: | | |
echo "atLeastOneJobSucceeded=${{ needs.parallel-all-succeeded.outputs.atLeastOneJobSucceeded }}" | |
echo "jobId=${{ needs.parallel-all-succeeded.outputs.jobId }}" | |
readout-pAll-successAndNotFailureOrCancelled: | |
if: success() && !(failure() || cancelled()) | |
needs: | |
- parallel-all-succeeded | |
- sleep | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Read parallel output | |
run: | | |
echo "atLeastOneJobSucceeded=${{ needs.parallel-all-succeeded.outputs.atLeastOneJobSucceeded }}" | |
echo "jobId=${{ needs.parallel-all-succeeded.outputs.jobId }}" | |
readout-pAll-successOrNotFailureOrCancelled: | |
if: success() || !(failure() || cancelled()) | |
needs: | |
- parallel-all-succeeded | |
- sleep | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Read parallel output | |
run: | | |
echo "atLeastOneJobSucceeded=${{ needs.parallel-all-succeeded.outputs.atLeastOneJobSucceeded }}" | |
echo "jobId=${{ needs.parallel-all-succeeded.outputs.jobId }}" | |
readout-pAll-notFailureOrCancelled: | |
if: ${{ !(failure() || cancelled()) }} | |
needs: | |
- parallel-all-succeeded | |
- sleep | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Read parallel output | |
run: | | |
echo "atLeastOneJobSucceeded=${{ needs.parallel-all-succeeded.outputs.atLeastOneJobSucceeded }}" | |
echo "jobId=${{ needs.parallel-all-succeeded.outputs.jobId }}" | |
readout-pFirstFail: | |
needs: | |
- parallel-first-failed | |
- sleep | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Read parallel output | |
run: | | |
echo "atLeastOneJobSucceeded=${{ needs.parallel-first-failed.outputs.atLeastOneJobSucceeded }}" | |
echo "jobId=${{ needs.parallel-first-failed.outputs.jobId }}" | |
readout-pFirstFail-always: | |
if: always() | |
needs: | |
- parallel-first-failed | |
- sleep | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Read parallel output | |
run: | | |
echo "atLeastOneJobSucceeded=${{ needs.parallel-first-failed.outputs.atLeastOneJobSucceeded }}" | |
echo "jobId=${{ needs.parallel-first-failed.outputs.jobId }}" | |
readout-pFirstFail-cancelled: | |
if: cancelled() | |
needs: | |
- parallel-first-failed | |
- sleep | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Read parallel output | |
run: | | |
echo "atLeastOneJobSucceeded=${{ needs.parallel-first-failed.outputs.atLeastOneJobSucceeded }}" | |
echo "jobId=${{ needs.parallel-first-failed.outputs.jobId }}" | |
readout-pFirstFail-failure: | |
if: failure() | |
needs: | |
- parallel-first-failed | |
- sleep | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Read parallel output | |
run: | | |
echo "atLeastOneJobSucceeded=${{ needs.parallel-first-failed.outputs.atLeastOneJobSucceeded }}" | |
echo "jobId=${{ needs.parallel-first-failed.outputs.jobId }}" | |
readout-pFirstFail-success: | |
if: success() | |
needs: | |
- parallel-first-failed | |
- sleep | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Read parallel output | |
run: | | |
echo "atLeastOneJobSucceeded=${{ needs.parallel-first-failed.outputs.atLeastOneJobSucceeded }}" | |
echo "jobId=${{ needs.parallel-first-failed.outputs.jobId }}" | |
readout-pFirstFail-failureOrCancelled: | |
if: failure() || cancelled() | |
needs: | |
- parallel-first-failed | |
- sleep | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Read parallel output | |
run: | | |
echo "atLeastOneJobSucceeded=${{ needs.parallel-first-failed.outputs.atLeastOneJobSucceeded }}" | |
echo "jobId=${{ needs.parallel-first-failed.outputs.jobId }}" | |
readout-pFirstFail-alwaysAndFailureOrCancelled: | |
if: always() && (failure() || cancelled()) | |
needs: | |
- parallel-first-failed | |
- sleep | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Read parallel output | |
run: | | |
echo "atLeastOneJobSucceeded=${{ needs.parallel-first-failed.outputs.atLeastOneJobSucceeded }}" | |
echo "jobId=${{ needs.parallel-first-failed.outputs.jobId }}" | |
readout-pFirstFail-successAndNotFailureOrCancelled: | |
if: success() && !(failure() || cancelled()) | |
needs: | |
- parallel-first-failed | |
- sleep | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Read parallel output | |
run: | | |
echo "atLeastOneJobSucceeded=${{ needs.parallel-first-failed.outputs.atLeastOneJobSucceeded }}" | |
echo "jobId=${{ needs.parallel-first-failed.outputs.jobId }}" | |
readout-pFirstFail-successOrNotFailureOrCancelled: | |
if: success() || !(failure() || cancelled()) | |
needs: | |
- parallel-first-failed | |
- sleep | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Read parallel output | |
run: | | |
echo "atLeastOneJobSucceeded=${{ needs.parallel-first-failed.outputs.atLeastOneJobSucceeded }}" | |
echo "jobId=${{ needs.parallel-first-failed.outputs.jobId }}" | |
readout-pFirstFail-notFailureOrCancelled: | |
if: ${{ !(failure() || cancelled()) }} | |
needs: | |
- parallel-first-failed | |
- sleep | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Read parallel output | |
run: | | |
echo "atLeastOneJobSucceeded=${{ needs.parallel-first-failed.outputs.atLeastOneJobSucceeded }}" | |
echo "jobId=${{ needs.parallel-first-failed.outputs.jobId }}" | |
readout-pLastFail: | |
needs: | |
- parallel-last-failed | |
- sleep | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Read parallel output | |
run: | | |
echo "atLeastOneJobSucceeded=${{ needs.parallel-last-failed.outputs.atLeastOneJobSucceeded }}" | |
echo "jobId=${{ needs.parallel-last-failed.outputs.jobId }}" | |
readout-pLastFail-always: | |
if: always() | |
needs: | |
- parallel-last-failed | |
- sleep | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Read parallel output | |
run: | | |
echo "atLeastOneJobSucceeded=${{ needs.parallel-last-failed.outputs.atLeastOneJobSucceeded }}" | |
echo "jobId=${{ needs.parallel-last-failed.outputs.jobId }}" | |
readout-pLastFail-cancelled: | |
if: cancelled() | |
needs: | |
- parallel-last-failed | |
- sleep | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Read parallel output | |
run: | | |
echo "atLeastOneJobSucceeded=${{ needs.parallel-last-failed.outputs.atLeastOneJobSucceeded }}" | |
echo "jobId=${{ needs.parallel-last-failed.outputs.jobId }}" | |
readout-pLastFail-failure: | |
if: failure() | |
needs: | |
- parallel-last-failed | |
- sleep | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Read parallel output | |
run: | | |
echo "atLeastOneJobSucceeded=${{ needs.parallel-last-failed.outputs.atLeastOneJobSucceeded }}" | |
echo "jobId=${{ needs.parallel-last-failed.outputs.jobId }}" | |
readout-pLastFail-success: | |
if: success() | |
needs: | |
- parallel-last-failed | |
- sleep | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Read parallel output | |
run: | | |
echo "atLeastOneJobSucceeded=${{ needs.parallel-last-failed.outputs.atLeastOneJobSucceeded }}" | |
echo "jobId=${{ needs.parallel-last-failed.outputs.jobId }}" | |
readout-pLastFail-failureOrCancelled: | |
if: failure() || cancelled() | |
needs: | |
- parallel-last-failed | |
- sleep | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Read parallel output | |
run: | | |
echo "atLeastOneJobSucceeded=${{ needs.parallel-last-failed.outputs.atLeastOneJobSucceeded }}" | |
echo "jobId=${{ needs.parallel-last-failed.outputs.jobId }}" | |
readout-pLastFail-alwaysAndFailureOrCancelled: | |
if: always() && (failure() || cancelled()) | |
needs: | |
- parallel-last-failed | |
- sleep | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Read parallel output | |
run: | | |
echo "atLeastOneJobSucceeded=${{ needs.parallel-last-failed.outputs.atLeastOneJobSucceeded }}" | |
echo "jobId=${{ needs.parallel-last-failed.outputs.jobId }}" | |
readout-pLastFail-successAndNotFailureOrCancelled: | |
if: success() && !(failure() || cancelled()) | |
needs: | |
- parallel-last-failed | |
- sleep | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Read parallel output | |
run: | | |
echo "atLeastOneJobSucceeded=${{ needs.parallel-last-failed.outputs.atLeastOneJobSucceeded }}" | |
echo "jobId=${{ needs.parallel-last-failed.outputs.jobId }}" | |
readout-pLastFail-successOrNotFailureOrCancelled: | |
if: success() || !(failure() || cancelled()) | |
needs: | |
- parallel-last-failed | |
- sleep | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Read parallel output | |
run: | | |
echo "atLeastOneJobSucceeded=${{ needs.parallel-last-failed.outputs.atLeastOneJobSucceeded }}" | |
echo "jobId=${{ needs.parallel-last-failed.outputs.jobId }}" | |
readout-pLastFail-notFailureOrCancelled: | |
if: ${{ !(failure() || cancelled()) }} | |
needs: | |
- parallel-last-failed | |
- sleep | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Read parallel output | |
run: | | |
echo "atLeastOneJobSucceeded=${{ needs.parallel-last-failed.outputs.atLeastOneJobSucceeded }}" | |
echo "jobId=${{ needs.parallel-last-failed.outputs.jobId }}" | |
# * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * | |
# With needed item that was skipped | |
# * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * | |
skipped: | |
if: ${{ false }} | |
runs-on: ubuntu-20.04 | |
steps: | |
- run: echo Is never executed | |
readout-withSkip-pAll: | |
needs: | |
- parallel-all-succeeded | |
- skipped | |
- sleep | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Read parallel output | |
run: | | |
echo "atLeastOneJobSucceeded=${{ needs.parallel-all-succeeded.outputs.atLeastOneJobSucceeded }}" | |
echo "jobId=${{ needs.parallel-all-succeeded.outputs.jobId }}" | |
readout-withSkip-pAll-always: | |
if: always() | |
needs: | |
- parallel-all-succeeded | |
- skipped | |
- sleep | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Read parallel output | |
run: | | |
echo "atLeastOneJobSucceeded=${{ needs.parallel-all-succeeded.outputs.atLeastOneJobSucceeded }}" | |
echo "jobId=${{ needs.parallel-all-succeeded.outputs.jobId }}" | |
readout-withSkip-pAll-cancelled: | |
if: cancelled() | |
needs: | |
- parallel-all-succeeded | |
- skipped | |
- sleep | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Read parallel output | |
run: | | |
echo "atLeastOneJobSucceeded=${{ needs.parallel-all-succeeded.outputs.atLeastOneJobSucceeded }}" | |
echo "jobId=${{ needs.parallel-all-succeeded.outputs.jobId }}" | |
readout-withSkip-pAll-failure: | |
if: failure() | |
needs: | |
- parallel-all-succeeded | |
- skipped | |
- sleep | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Read parallel output | |
run: | | |
echo "atLeastOneJobSucceeded=${{ needs.parallel-all-succeeded.outputs.atLeastOneJobSucceeded }}" | |
echo "jobId=${{ needs.parallel-all-succeeded.outputs.jobId }}" | |
readout-withSkip-pAll-success: | |
if: success() | |
needs: | |
- parallel-all-succeeded | |
- skipped | |
- sleep | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Read parallel output | |
run: | | |
echo "atLeastOneJobSucceeded=${{ needs.parallel-all-succeeded.outputs.atLeastOneJobSucceeded }}" | |
echo "jobId=${{ needs.parallel-all-succeeded.outputs.jobId }}" | |
readout-withSkip-pAll-failureOrCancelled: | |
if: failure() || cancelled() | |
needs: | |
- parallel-all-succeeded | |
- skipped | |
- sleep | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Read parallel output | |
run: | | |
echo "atLeastOneJobSucceeded=${{ needs.parallel-all-succeeded.outputs.atLeastOneJobSucceeded }}" | |
echo "jobId=${{ needs.parallel-all-succeeded.outputs.jobId }}" | |
readout-withSkip-pAll-alwaysAndFailureOrCancelled: | |
if: always() && (failure() || cancelled()) | |
needs: | |
- parallel-all-succeeded | |
- skipped | |
- sleep | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Read parallel output | |
run: | | |
echo "atLeastOneJobSucceeded=${{ needs.parallel-all-succeeded.outputs.atLeastOneJobSucceeded }}" | |
echo "jobId=${{ needs.parallel-all-succeeded.outputs.jobId }}" | |
readout-withSkip-pAll-successAndNotFailureOrCancelled: | |
if: success() && !(failure() || cancelled()) | |
needs: | |
- parallel-all-succeeded | |
- skipped | |
- sleep | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Read parallel output | |
run: | | |
echo "atLeastOneJobSucceeded=${{ needs.parallel-all-succeeded.outputs.atLeastOneJobSucceeded }}" | |
readout-withSkip-pAll-successOrNotFailureOrCancelled: | |
if: success() || !(failure() || cancelled()) | |
needs: | |
- parallel-all-succeeded | |
- skipped | |
- sleep | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Read parallel output | |
run: | | |
echo "atLeastOneJobSucceeded=${{ needs.parallel-all-succeeded.outputs.atLeastOneJobSucceeded }}" | |
echo "jobId=${{ needs.parallel-all-succeeded.outputs.jobId }}" | |
readout-withSkip-pAll-notFailureOrCancelled: | |
if: ${{ !(failure() || cancelled()) }} | |
needs: | |
- parallel-all-succeeded | |
- skipped | |
- sleep | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Read parallel output | |
run: | | |
echo "atLeastOneJobSucceeded=${{ needs.parallel-all-succeeded.outputs.atLeastOneJobSucceeded }}" | |
echo "jobId=${{ needs.parallel-all-succeeded.outputs.jobId }}" | |
readout-withSkip-pFirstFail: | |
needs: | |
- parallel-first-failed | |
- skipped | |
- sleep | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Read parallel output | |
run: | | |
echo "atLeastOneJobSucceeded=${{ needs.parallel-first-failed.outputs.atLeastOneJobSucceeded }}" | |
echo "jobId=${{ needs.parallel-first-failed.outputs.jobId }}" | |
readout-withSkip-pFirstFail-always: | |
if: always() | |
needs: | |
- parallel-first-failed | |
- skipped | |
- sleep | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Read parallel output | |
run: | | |
echo "atLeastOneJobSucceeded=${{ needs.parallel-first-failed.outputs.atLeastOneJobSucceeded }}" | |
echo "jobId=${{ needs.parallel-first-failed.outputs.jobId }}" | |
readout-withSkip-pFirstFail-cancelled: | |
if: cancelled() | |
needs: | |
- parallel-first-failed | |
- skipped | |
- sleep | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Read parallel output | |
run: | | |
echo "atLeastOneJobSucceeded=${{ needs.parallel-first-failed.outputs.atLeastOneJobSucceeded }}" | |
echo "jobId=${{ needs.parallel-first-failed.outputs.jobId }}" | |
readout-withSkip-pFirstFail-failure: | |
if: failure() | |
needs: | |
- parallel-first-failed | |
- skipped | |
- sleep | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Read parallel output | |
run: | | |
echo "atLeastOneJobSucceeded=${{ needs.parallel-first-failed.outputs.atLeastOneJobSucceeded }}" | |
echo "jobId=${{ needs.parallel-first-failed.outputs.jobId }}" | |
readout-withSkip-pFirstFail-success: | |
if: success() | |
needs: | |
- parallel-first-failed | |
- skipped | |
- sleep | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Read parallel output | |
run: | | |
echo "atLeastOneJobSucceeded=${{ needs.parallel-first-failed.outputs.atLeastOneJobSucceeded }}" | |
echo "jobId=${{ needs.parallel-first-failed.outputs.jobId }}" | |
readout-withSkip-pFirstFail-failureOrCancelled: | |
if: failure() || cancelled() | |
needs: | |
- parallel-first-failed | |
- skipped | |
- sleep | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Read parallel output | |
run: | | |
echo "atLeastOneJobSucceeded=${{ needs.parallel-first-failed.outputs.atLeastOneJobSucceeded }}" | |
echo "jobId=${{ needs.parallel-first-failed.outputs.jobId }}" | |
readout-withSkip-pFirstFail-alwaysAndFailureOrCancelled: | |
if: always() && (failure() || cancelled()) | |
needs: | |
- parallel-first-failed | |
- skipped | |
- sleep | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Read parallel output | |
run: | | |
echo "atLeastOneJobSucceeded=${{ needs.parallel-first-failed.outputs.atLeastOneJobSucceeded }}" | |
echo "jobId=${{ needs.parallel-first-failed.outputs.jobId }}" | |
readout-withSkip-pFirstFail-successAndNotFailureOrCancelled: | |
if: success() && !(failure() || cancelled()) | |
needs: | |
- parallel-first-failed | |
- skipped | |
- sleep | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Read parallel output | |
run: | | |
echo "atLeastOneJobSucceeded=${{ needs.parallel-first-failed.outputs.atLeastOneJobSucceeded }}" | |
readout-withSkip-pFirstFail-successOrNotFailureOrCancelled: | |
if: success() || !(failure() || cancelled()) | |
needs: | |
- parallel-first-failed | |
- skipped | |
- sleep | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Read parallel output | |
run: | | |
echo "atLeastOneJobSucceeded=${{ needs.parallel-first-failed.outputs.atLeastOneJobSucceeded }}" | |
echo "jobId=${{ needs.parallel-first-failed.outputs.jobId }}" | |
readout-withSkip-pFirstFail-notFailureOrCancelled: | |
if: ${{ !(failure() || cancelled()) }} | |
needs: | |
- parallel-first-failed | |
- skipped | |
- sleep | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Read parallel output | |
run: | | |
echo "atLeastOneJobSucceeded=${{ needs.parallel-first-failed.outputs.atLeastOneJobSucceeded }}" | |
echo "jobId=${{ needs.parallel-first-failed.outputs.jobId }}" | |
readout-withSkip-pLastFail: | |
needs: | |
- parallel-last-failed | |
- skipped | |
- sleep | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Read parallel output | |
run: | | |
echo "atLeastOneJobSucceeded=${{ needs.parallel-last-failed.outputs.atLeastOneJobSucceeded }}" | |
echo "jobId=${{ needs.parallel-last-failed.outputs.jobId }}" | |
readout-withSkip-pLastFail-always: | |
if: always() | |
needs: | |
- parallel-last-failed | |
- skipped | |
- sleep | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Read parallel output | |
run: | | |
echo "atLeastOneJobSucceeded=${{ needs.parallel-last-failed.outputs.atLeastOneJobSucceeded }}" | |
echo "jobId=${{ needs.parallel-last-failed.outputs.jobId }}" | |
readout-withSkip-pLastFail-cancelled: | |
if: cancelled() | |
needs: | |
- parallel-last-failed | |
- skipped | |
- sleep | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Read parallel output | |
run: | | |
echo "atLeastOneJobSucceeded=${{ needs.parallel-last-failed.outputs.atLeastOneJobSucceeded }}" | |
echo "jobId=${{ needs.parallel-last-failed.outputs.jobId }}" | |
readout-withSkip-pLastFail-failure: | |
if: failure() | |
needs: | |
- parallel-last-failed | |
- skipped | |
- sleep | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Read parallel output | |
run: | | |
echo "atLeastOneJobSucceeded=${{ needs.parallel-last-failed.outputs.atLeastOneJobSucceeded }}" | |
echo "jobId=${{ needs.parallel-last-failed.outputs.jobId }}" | |
readout-withSkip-pLastFail-success: | |
if: success() | |
needs: | |
- parallel-last-failed | |
- skipped | |
- sleep | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Read parallel output | |
run: | | |
echo "atLeastOneJobSucceeded=${{ needs.parallel-last-failed.outputs.atLeastOneJobSucceeded }}" | |
echo "jobId=${{ needs.parallel-last-failed.outputs.jobId }}" | |
readout-withSkip-pLastFail-failureOrCancelled: | |
if: failure() || cancelled() | |
needs: | |
- parallel-last-failed | |
- skipped | |
- sleep | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Read parallel output | |
run: | | |
echo "atLeastOneJobSucceeded=${{ needs.parallel-last-failed.outputs.atLeastOneJobSucceeded }}" | |
echo "jobId=${{ needs.parallel-last-failed.outputs.jobId }}" | |
readout-withSkip-pLastFail-alwaysAndFailureOrCancelled: | |
if: always() && (failure() || cancelled()) | |
needs: | |
- parallel-last-failed | |
- skipped | |
- sleep | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Read parallel output | |
run: | | |
echo "atLeastOneJobSucceeded=${{ needs.parallel-last-failed.outputs.atLeastOneJobSucceeded }}" | |
echo "jobId=${{ needs.parallel-last-failed.outputs.jobId }}" | |
readout-withSkip-pLastFail-successAndNotFailureOrCancelled: | |
if: success() && !(failure() || cancelled()) | |
needs: | |
- parallel-last-failed | |
- skipped | |
- sleep | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Read parallel output | |
run: | | |
echo "atLeastOneJobSucceeded=${{ needs.parallel-last-failed.outputs.atLeastOneJobSucceeded }}" | |
readout-withSkip-pLastFail-successOrNotFailureOrCancelled: | |
if: success() || !(failure() || cancelled()) | |
needs: | |
- parallel-last-failed | |
- skipped | |
- sleep | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Read parallel output | |
run: | | |
echo "atLeastOneJobSucceeded=${{ needs.parallel-last-failed.outputs.atLeastOneJobSucceeded }}" | |
echo "jobId=${{ needs.parallel-last-failed.outputs.jobId }}" | |
readout-withSkip-pLastFail-notFailureOrCancelled: | |
if: ${{ !(failure() || cancelled()) }} | |
needs: | |
- parallel-last-failed | |
- skipped | |
- sleep | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Read parallel output | |
run: | | |
echo "atLeastOneJobSucceeded=${{ needs.parallel-last-failed.outputs.atLeastOneJobSucceeded }}" | |
echo "jobId=${{ needs.parallel-last-failed.outputs.jobId }}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment