Bootstrapper Health Check #64
This file contains hidden or 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
| name: Bootstrapper Health Check | |
| on: | |
| schedule: | |
| - cron: "0 6 * * *" # 6 AM UTC daily | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| test-bootstrapper-health: | |
| name: Test Bootstrapper Health | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-go@v6 | |
| with: | |
| go-version-file: go.mod | |
| - name: Run bootstrapper health check | |
| run: go test -tags bootstrapper_health -run TestBootstrapperHealth -v -timeout 5m ./nodebuilder/p2p/ | |
| notify-slack-on-failure: | |
| name: Notify Slack on Failure | |
| needs: [test-bootstrapper-health] | |
| runs-on: ubuntu-latest | |
| if: ${{ always() && needs.test-bootstrapper-health.result == 'failure' }} | |
| steps: | |
| - name: Notify Slack | |
| uses: slackapi/slack-github-action@45a88b9581bfab2566dc881e2cd66d334e621e2c # v3.0.3 | |
| with: | |
| webhook: ${{ secrets.SLACK_WEBHOOK_URL }} | |
| webhook-type: incoming-webhook | |
| payload: | | |
| { | |
| "text": "Bootstrapper health check failed! <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|View run>" | |
| } |