-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
split out actions into two directions
- Loading branch information
Showing
5 changed files
with
115 additions
and
66 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: Smoke test post deploy | ||
description: Ping a backend health endpoint that reaches into the db and return a status message to a frontend status page. Visit that page and ensure things are healthy | ||
inputs: | ||
deploy-env: | ||
description: The environment being deployed (e.g. "prod" or "test") | ||
required: true | ||
|
||
smoke-test-front-and-back-end: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: create env file | ||
working-directory: frontend | ||
run: | | ||
touch .env | ||
echo REACT_APP_BASE_URL=https://${{ inputs.deploy_env }}.simplereport.gov/ >> .env.production.local | ||
- name: Run smoke test script | ||
working-directory: frontend | ||
run: yarn smoke:prod:deploy:ci | ||
|
||
# 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 }} |
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: Smoke test deploy | ||
run-name: Smoke test the deploy for ${{ inputs.deploy_env }} by @${{ github.actor }} | ||
|
||
on: | ||
# DELETE ME WHEN MERGING | ||
push: | ||
workflow_dispatch: | ||
inputs: | ||
deploy_env: | ||
description: 'The environment to smoke test' | ||
required: true | ||
type: choice | ||
options: | ||
- "" | ||
- dev | ||
- dev2 | ||
- dev3 | ||
- dev4 | ||
- dev5 | ||
- dev6 | ||
- dev7 | ||
- pentest | ||
|
||
env: | ||
NODE_VERSION: 18 | ||
|
||
jobs: | ||
smoke-test-front-and-back-end: | ||
- uses: actions/checkout@v4 | ||
- name: Use Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '18' | ||
- 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: | ||
# REPLACE ME WITH deploy-env: ${{inputs.deploy_env}} | ||
deploy-env: dev7 | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Smoke test deploy | ||
run-name: Smoke test the deploy for ${{ inputs.deploy_env }} by @${{ github.actor }} | ||
|
||
on: | ||
# DELETE ME WHEN MERGING | ||
push: | ||
workflow_run: | ||
workflows: [ " Deploy Prod" ] | ||
types: | ||
- completed | ||
|
||
env: | ||
NODE_VERSION: 18 | ||
DEPLOY_ENV: prod | ||
|
||
jobs: | ||
smoke-test-front-and-back-end: | ||
- uses: actions/checkout@v4 | ||
- name: Use Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '18' | ||
- 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: | ||
deploy-env: ${{env.DEPLOY_ENV}} |
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