Skip to content

Commit

Permalink
Add production sanity test to CI (#799)
Browse files Browse the repository at this point in the history
  • Loading branch information
rwood-moz authored Dec 19, 2024
1 parent a81387d commit 266d24b
Show file tree
Hide file tree
Showing 2 changed files with 85 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/deploy-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -233,3 +233,38 @@ jobs:
terragrunt validate
terragrunt plan -var "image=${{ steps.get_ecr_tag.outputs.ecr_tag }}" -out tfplan
terragrunt apply tfplan
prod-sanity-browserstack:
name: prod-sanity-browserstack
needs: [deploy-prod-backend, deploy-prod-frontend]
runs-on: ubuntu-latest
environment: production
env:
APPT_PROD_LOGIN_EMAIL: ${{ secrets.E2E_APPT_PROD_LOGIN_EMAIL }}
APPT_PROD_LOGIN_PWORD: ${{ secrets.E2E_APPT_PROD_LOGIN_PASSWORD }}
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
cache-dependency-path: 'test/e2e/package-lock.json'

- name: Install dependencies
run: |
cd ./test/e2e
npm install
- name: BrowserStack Env Setup
uses: browserstack/github-actions/setup-env@master
with:
username: ${{ secrets.BROWSERSTACK_USERNAME }}
access-key: ${{ secrets.BROWSERSTACK_ACCESS_KEY }}
project-name: 'Thunderbird Appointment'

- name: Run Playwright Tests on Browserstack
run: |
cd ./test/e2e
cp .env.example .env
npm run prod-sanity-test-browserstack
50 changes: 50 additions & 0 deletions .github/workflows/nightly-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: nightly-tests

concurrency:
group: nightly-tests
cancel-in-progress: true

on:
schedule:
# run every day at 1am UTC (8PM EST)
- cron: '0 1 * * *'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

permissions:
contents: read # This is required for actions/checkout

jobs:
prod-sanity-browserstack:
name: prod-sanity-browserstack
runs-on: ubuntu-latest
environment: production
env:
APPT_PROD_LOGIN_EMAIL: ${{ secrets.E2E_APPT_PROD_LOGIN_EMAIL }}
APPT_PROD_LOGIN_PWORD: ${{ secrets.E2E_APPT_PROD_LOGIN_PASSWORD }}
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
cache-dependency-path: 'test/e2e/package-lock.json'

- name: Install dependencies
run: |
cd ./test/e2e
npm install
- name: BrowserStack Env Setup
uses: browserstack/github-actions/setup-env@master
with:
username: ${{ secrets.BROWSERSTACK_USERNAME }}
access-key: ${{ secrets.BROWSERSTACK_ACCESS_KEY }}
project-name: 'Thunderbird Appointment'

- name: Run Playwright Tests on Browserstack
run: |
cd ./test/e2e
cp .env.example .env
npm run prod-sanity-test-browserstack

0 comments on commit 266d24b

Please sign in to comment.