[TC-691] emcr to 5 days instead of 30 #1184
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: Tests pipeline | |
on: | |
workflow_dispatch: | |
pull_request: | |
env: | |
ENV: ci | |
KEYCLOAK_PORT: 8080 | |
KEYCLOAK_REALM: ${{ secrets.KEYCLOAK_REALM }} | |
KEYCLOAK_CLIENT: ${{ secrets.KEYCLOAK_CLIENT }} | |
KEYCLOAK_AUTH_URL: ${{ secrets.KEYCLOAK_AUTH_URL }} | |
KEYCLOAK_USER: ${{ secrets.KEYCLOAK_USER }} | |
KEYCLOAK_PASSWORD: ${{ secrets.KEYCLOAK_PASSWORD }} | |
CYPRESS_BASE_URL: http://localhost:3000 | |
CYPRESS_AUTH_ORIGIN: https://logontest7.gov.bc.ca/ | |
TARGET: dev | |
jobs: | |
run-tests: | |
runs-on: ubuntu-latest | |
timeout-minutes: 20 | |
steps: | |
- name: checkout | |
uses: actions/checkout@v3 | |
- name: Cancel Previous Runs | |
uses: styfle/[email protected] | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 20.x | |
- name: Setup ENV file | |
run: cp .env.example .env | |
- name: Install Backend Dependencies | |
run: cd backend && npm ci | |
- name: Install Frontend Dependencies | |
run: cd frontend && npm ci | |
- name: Run Docker containers | |
run: make build-test | |
- name: Seed Test Data | |
run: make seed-local-emcr | |
- name: Run Frontend Tests | |
run: make test-frontend-pipeline | |
- name: Run Backend Tests | |
run: make test-backend-pipeline | |
- uses: actions/upload-artifact@v2 | |
if: failure() | |
with: | |
name: cypress-screenshots | |
path: ./frontend/cypress/screenshots | |
- name: Stop containers | |
run: make close | |
if: ${{ always() }} |