Skip to content

login page

login page #7

Workflow file for this run

# # This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs
# name: Node.js CI
# on:
# push:
# branches: [ "main" ]
# pull_request:
# branches: [ "main" ]
# jobs:
# build:
# runs-on: ubuntu-latest
# strategy:
# matrix:
# node-version: [18.x]
# # See supported Node.js release schedule at https://nodejs.org/en/about/releases/
# steps:
# - uses: actions/checkout@v3
# - name: Use Node.js ${{ matrix.node-version }}
# uses: actions/setup-node@v3
# with:
# node-version: ${{ matrix.node-version }}
# cache: 'npm'
# - run: npm ci --force
# - run: npm run build --if-present
# - run: npx nx e2e frontend-e2e --skip-cache
name: Cypress Tests
on: [push]
jobs:
install:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Cypress install
uses: cypress-io/github-action@v5
with:
# Disable running of tests within install job
runTests: false
build: npm run build
- name: Save build folder
uses: actions/upload-artifact@v3
with:
name: build
if-no-files-found: error
path: dist/apps/frontend
cypress-run:
runs-on: ubuntu-latest
needs: install
# Runs tests in parallel with matrix strategy https://docs.cypress.io/guides/guides/parallelization
# https://docs.github.com/en/actions/using-jobs/using-a-matrix-for-your-jobs
# Also see warning here https://github.com/cypress-io/github-action#parallel
strategy:
fail-fast: false # https://github.com/cypress-io/github-action/issues/48
matrix:
containers: [1, 2] # Uses 2 parallel instances
steps:
- name: Checkout
uses: actions/checkout@v3
- id: 'auth'
name: Authenticate to Google Cloud
uses: google-github-actions/auth@v0
with:
credentials_json: '${{ secrets.GCP_PRIVATE_KEY }}'
# Setup gcloud CLI
- name: Set up Cloud SDK
uses: google-github-actions/setup-gcloud@v0
- name: Cypress run
# Uses the official Cypress GitHub action https://github.com/cypress-io/github-action
uses: cypress-io/github-action@v4
with:
# Starts web server for E2E tests - replace with your own server invocation
# https://docs.cypress.io/guides/continuous-integration/introduction#Boot-your-server
start: npx nx serve server
wait-on: 'http://localhost:3000/api' # Waits for above
# Records to Cypress Cloud
# https://docs.cypress.io/guides/cloud/projects#Set-up-a-project-to-record
browser: chrome
record: true
parallel: true # Runs test in parallel using settings above
command: npx nx e2e frontend-e2e --skip-cache
env:
# For recording and parallelization to work you must set your CYPRESS_RECORD_KEY
# in GitHub repo → Settings → Secrets → Actions
# CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
# Creating a token https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GCP_PRIVATE_KEY: ${{ secrets.GCP_PRIVATE_KEY }}
FIREBASE_ADMINSDK_KEY: '${{ secrets.FIREBASE_ADMINSDK_KEY }}'