Smoke test the deploy for prod by @github-merge-queue[bot] #31
This file contains 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: Smoke test deploy Prod | |
run-name: Smoke test the deploy for prod by @${{ github.actor }} | |
on: | |
workflow_run: | |
workflows: [ "Deploy Prod" ] | |
types: | |
- completed | |
env: | |
NODE_VERSION: 18 | |
jobs: | |
smoke-test-front-and-back-end: | |
runs-on: ubuntu-latest | |
environment: Production | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{env.NODE_VERSION}} | |
- name: Cache yarn | |
uses: actions/[email protected] | |
with: | |
path: ~/.cache/yarn | |
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
- name: Set up dependencies | |
working-directory: frontend | |
run: yarn install --prefer-offline | |
- name: Smoke test the env | |
uses: ./.github/actions/post-deploy-smoke-test | |
with: | |
base_domain_name: ${{ vars.BASE_DOMAIN_NAME }} | |
slack_alert: | |
runs-on: ubuntu-latest | |
if: failure() | |
needs: [ smoke-test-front-and-back-end ] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Send alert to Slack | |
uses: ./.github/actions/slack-message | |
with: | |
username: ${{ github.actor }} | |
description: | | |
:siren-gif: Post-deploy smoke test couldn't verify that the frontend is talking to the backend. ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} :siren-gif: | |
webhook_url: ${{ secrets.SR_ALERTS_SLACK_WEBHOOK_URL }} | |
user_map: $${{ secrets.SR_ALERTS_GITHUB_SLACK_MAP }} |