Merge pull request #32684 from woocommerce/add/smoke-test-daily-site-checker

Adding workflow to check status of site used for daily smoke tests.
This commit is contained in:
Jonathan Lane 2022-04-21 12:07:05 -07:00 committed by GitHub
commit ca54907267
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 24 additions and 0 deletions

View File

@ -0,0 +1,24 @@
name: Check daily smoke test site status.
on:
schedule:
- cron: '25 7 * * *'
jobs:
ping_site:
runs-on: ubuntu-latest
name: Check site and notify if not found
steps:
- name: Check site status
id: sitecheck
uses: srt32/uptime@958231f4d95c117f08eb0fc70907e80d0dfedf2b
with:
url-to-hit: "${{ secrets.SMOKE_TEST_URL }}ready/"
expected-statuses: "200,301"
- name: Send message to Slack API
if: failure()
uses: archive/github-actions-slack@deecc2edc496dc642d643de1d7cf3a47f51fb27a
id: notify
with:
slack-bot-user-oauth-access-token: ${{ secrets.SMOKE_TEST_SLACK_TOKEN }}
slack-channel: ${{ secrets.SMOKE_TEST_SLACK_CHANNEL }}
slack-text: ':warning: <!subteam^${{ secrets.SMOKE_TEST_SLACK_GROUP }}> FYI the URL ${{ secrets.SMOKE_TEST_URL }}ready/ appears to be returning `404 not found` :x:'