-
Notifications
You must be signed in to change notification settings - Fork 5
85 lines (79 loc) · 2.75 KB
/
local-regression-tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
---
name: Regression Tests for Pull Requests
on:
push:
branches:
- pd/2311-pr-regression-tests
# workflow_dispatch:
# inputs:
# url:
# description: "Base URL for Cypress"
# required: true
# type: string
# default: "http://localhost:8000"
# environment:
# required: true
# type: string
# default: "staging"
# workflow_call:
# inputs:
# url:
# description: "Base URL for Cypress"
# required: true
# type: string
# environment:
# required: true
# type: string
jobs:
regression-testing:
runs-on: ubuntu-latest
environment: dev
env:
# Container Related ENV
ENV: TESTING
SAM_API_KEY: ${{ secrets.SAM_API_KEY }}
DJANGO_BASE_URL: 'http://localhost:8000'
DJANGO_SECRET_LOGIN_KEY: ${{ secrets.DJANGO_SECRET_LOGIN_KEY }}
LOGIN_CLIENT_ID: ${{ secrets.LOGIN_CLIENT_ID }}
SECRET_KEY: ${{ secrets.SECRET_KEY }}
ALLOWED_HOSTS: '0.0.0.0 127.0.0.1 localhost'
PGRST_JWT_SECRET: ${{ secrets.PGRST_JWT_SECRET }}
# Cypress Related ENV
CYPRESS_API_GOV_KEY: ${{ secrets.CYPRESS_API_GOV_KEY }}
CYPRESS_API_GOV_URL: ${{ secrets.CYPRESS_API_GOV_URL }}
CYPRESS_BASE_URL: 'https://fac-dev.app.cloud.gov'
CYPRESS_LOGIN_TEST_EMAIL: ${{ secrets.CYPRESS_LOGIN_TEST_EMAIL }}
CYPRESS_LOGIN_TEST_PASSWORD: ${{ secrets.CYPRESS_LOGIN_TEST_PASSWORD }}
CYPRESS_LOGIN_TEST_OTP_SECRET: ${{ secrets.CYPRESS_LOGIN_TEST_OTP_SECRET }}
CYPRESS_LOGIN_TEST_EMAIL_AUDITEE: ${{ secrets.CYPRESS_LOGIN_TEST_EMAIL_AUDITEE }}
CYPRESS_LOGIN_TEST_PASSWORD_AUDITEE: ${{ secrets.CYPRESS_LOGIN_TEST_PASSWORD_AUDITEE }}
CYPRESS_LOGIN_TEST_OTP_SECRET_AUDITEE: ${{ secrets.CYPRESS_LOGIN_TEST_OTP_SECRET_AUDITEE }}
DISABLE_AUTH: False
# useful for debugging but otherwise complete overwhelm
# DEBUG: cypress:*
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: 18
- name: Start Services
working-directory: ./backend
run: |
touch .env
docker compose -f docker-compose-web.yml up -d
- name: install npm dependencies
working-directory: ./backend
run: sudo npm install
- name: remove node_modules/.bin
run: sudo rm -rf /home/runner/work/FAC/FAC/backend/node_modules/
- name: Run Cypress full submission test
uses: Wandalen/wretry.action@master
with:
action: cypress-io/github-action@v6
with: |
working-directory: ./backend
spec: cypress/e2e/full-submission.cy.js
browser: chrome
attempt_limit: 5
attempt_delay: 2000