Skip to content

Commit

Permalink
final fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
johnrwatson committed Dec 9, 2024
1 parent 179a869 commit ca0120a
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions .github/workflows/run-api-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,14 +112,7 @@ jobs:
# Check the exit code
if [ -z "$exit_code" ]; then
echo "Deno task succeeded [ or this failed for a totally non-valid reason ]!"
# Randomly make it fail to test logic
if [[ "$(( ( RANDOM % 5 ) + 1 ))" == "3" ]]; then
echo "last_exit_code=53" >> "$GITHUB_ENV"
exit 53
fi
echo "Deno task succeeded [ or the orchestration failed for a totally non-valid reason ]!"
break
fi
Expand Down Expand Up @@ -147,14 +140,14 @@ jobs:
if: ${{ failure() && env.last_exit_code == '53' }}
uses: actions/upload-artifact@v3
with:
name: debug-${{ matrix.tests.name }}
name: ${{ matrix.tests.name }}
path: artifacts/${{ matrix.tests.name }}

on-failure:
runs-on: ubuntu-latest
needs: api-test
environment: ${{ inputs.environment }}
if: ${{ failure() }} #&& github.ref == 'refs/heads/main' }} #TODO(johnrwatson): disable comment before merging
if: ${{ failure() }} && github.ref == 'refs/heads/main' }}
steps:
- name: Download all artifacts
uses: actions/download-artifact@v3
Expand Down Expand Up @@ -189,7 +182,7 @@ jobs:
}"
fi
- run: |
# Always send the Internal Slack Notification if failure detected, even if we didn't page
# Always send the Internal Slack Notification if failure detected, regardless of error source
curl --location "${{ secrets.SLACK_WEBHOOK_URL }}" -X POST \
--header 'Content-type: application/json' \
--data "{\"text\": \":si: Failed API Tests for ${{ inputs.environment }}: <https://github.com/systeminit/si/actions/runs/$GITHUB_RUN_ID|:test_tube: Link>\"}"

0 comments on commit ca0120a

Please sign in to comment.