Skip to content

Commit

Permalink
build: fix pueue wait conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
LightAndLight committed Jan 15, 2024
1 parent c9360c7 commit 5e22877
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,17 +57,18 @@ jobs:
-c ./scripts/recheck ${{ github.event.before }} $GITHUB_REF_NAME
- name: wait for uploads to finish
if: always()
run: pueue wait
# This used to be always(), which can't be cancelled: <https://github.com/orgs/community/discussions/26303>
if: ${{ !cancelled() }}
run: pueue log --json | jq '.[].task | select(.label == "'$GITHUB_RUN_ID-$GITHUB_RUN_NUMBER'") | .id' | xargs -r pueue wait

- name: log all uploads
if: always()
if: ${{ !cancelled() }}
run: pueue log --json | jq 'select(.[].task.label == "'$GITHUB_RUN_ID-$GITHUB_RUN_NUMBER'") | .[].task.original_command' -r

- name: log failed uploads
if: always()
if: ${{ !cancelled() }}
run: pueue log --json | jq 'select(.[].task.label == "'$GITHUB_RUN_ID-$GITHUB_RUN_NUMBER'") | to_entries[] | select(.value.task.status.Done != "Success") | .key' -r | xargs -r pueue log

- name: check uploads succeeded
if: always()
if: ${{ !cancelled() }}
run: "[ \"$(pueue log --json | jq 'select (.[].task.label == \"'$GITHUB_RUN_ID-$GITHUB_RUN_NUMBER'\") | to_entries[] | select(.value.task.status.Done != \"Success\") | .key' -r)\" == \"\" ]"

0 comments on commit 5e22877

Please sign in to comment.