TEST - install npm deps #7
Workflow file for this run
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: 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: 'http://localhost:8000/' | |
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: npm install | |
- 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 | |
attempt_limit: 5 | |
attempt_delay: 2000 | |
- uses: actions/upload-artifact@v3 | |
# add the line below to store screenshots only on failures | |
if: failure() | |
with: | |
name: cypress-screenshots | |
path: backend/cypress/screenshots | |
if-no-files-found: warn # 'warn' or 'error' are also available, defaults to `warn` |