Skip to content

TEST - remove all node_modules #13

TEST - remove all node_modules

TEST - remove all node_modules #13

---
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