Skip to content

Commit

Permalink
[ci] use !cancelled() as run condition
Browse files Browse the repository at this point in the history
This can help workflow automatically exit without forcing cancellation.

Signed-off-by: Avimitin <[email protected]>
  • Loading branch information
Avimitin authored and sequencer committed Jan 21, 2024
1 parent 2fcbebb commit 9f2d668
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/postpr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
nix shell '.#ammonite' -c .github/scripts/ci.sc convertPerfToMD
- uses: actions/upload-artifact@v4
if: always()
if: !cancelled()
with:
name: test-results-${{ matrix.id }}
path: |
Expand All @@ -56,14 +56,14 @@ jobs:
perf-result-*.md
- uses: actions/upload-artifact@v4
if: always()
if: !cancelled()
with:
name: nix-post-build-hook-log-${{ matrix.id }}
path: /tmp/nix-post-build-hook.log

report:
name: "Report CI result"
if: always() && github.event.pull_request.merged == true
if: !cancelled() && github.event.pull_request.merged == true
needs: [run-testcases]
runs-on: [self-hosted, linux, nixos]
steps:
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ jobs:
--resultDir test-results-$(head -c 10 /dev/urandom | base32)
- uses: actions/upload-artifact@v4
if: always()
if: !cancelled()
with:
name: test-reports-${{ matrix.id }}
path: |
Expand All @@ -110,15 +110,15 @@ jobs:
path: test-results-*/failed-logs

- uses: actions/upload-artifact@v4
if: always()
if: !cancelled()
with:
name: nix-post-build-hook-log-${{ matrix.id }}
path: /tmp/nix-post-build-hook.log


gen-fail-wave-matrix:
name: "Generate matrix for re-testing failing tests"
if: always()
if: !cancelled()
needs: [run-testcases]
runs-on: [self-hosted, linux, nixos]
outputs:
Expand Down Expand Up @@ -147,7 +147,7 @@ jobs:
build-fail-wave:
name: "Generate wave for failing tests"
needs: [build-emulators, gen-fail-wave-matrix]
if: ${{ always() && needs.gen-fail-wave-matrix.outputs.generate_wave == 'true' }}
if: ${{ !cancelled() && needs.gen-fail-wave-matrix.outputs.generate_wave == 'true' }}
strategy:
fail-fast: false
matrix: ${{ fromJSON(needs.gen-fail-wave-matrix.outputs.retry_tasks) }}
Expand Down Expand Up @@ -179,7 +179,7 @@ jobs:
report:
name: "Report CI result"
if: always()
if: ${{ !cancelled() }}
needs: [run-testcases]
runs-on: [self-hosted, linux, nixos]
steps:
Expand Down

0 comments on commit 9f2d668

Please sign in to comment.