Skip to content

Commit

Permalink
handle failure scenario
Browse files Browse the repository at this point in the history
  • Loading branch information
lulf committed May 13, 2024
1 parent 44850d1 commit 143fb15
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,17 @@ jobs:
run: |
cd host
cargo test --test '*' -- --nocapture
- name: Update status
- name: Update failed status
if: failure()
env:
COMMIT: ${{ steps.checkout.outputs.commit }}
GH_TOKEN: ${{ github.token }}
run: |
gh api --method POST -H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" /repos/embassy-rs/trouble/statuses/${COMMIT} \
-f "state=failure" -f "description=The build failed" -f "context=tests"
- name: Update success status
if: success()
env:
COMMIT: ${{ steps.checkout.outputs.commit }}
GH_TOKEN: ${{ github.token }}
Expand Down

0 comments on commit 143fb15

Please sign in to comment.