Skip to content

GP cypress testing

GP cypress testing #21

Workflow file for this run

name: Cypress Tests
on:
push:
branches: ['main']
pull_request:
branches: ['main']
jobs:
cypress-run:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x, 20.x]
mongodb-version: ['4.2', '4.4', '5.0', '6.0']
steps:
- name: Git Checkout Repo
uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Start MongoDB
uses: supercharge/mongodb-github-action@1.10.0
with:
mongodb-version: ${{ matrix.mongodb-version }}
mongodb-replica-set: test-rs
mongodb-port: 42069
- name: Install Backend Modules
uses: cypress-io/github-action@v6
with:
install-command: npm run install:backend
runTests: false
- name: Install Frontend modules
uses: cypress-io/github-action@v6
with:
install-command: npm run install:frontend
runTests: false
- name: Run E2E tests 🧪
uses: cypress-io/github-action@v6
with:
# start: npm run start:frontend, npm run start:server
start: npm start, npm run client
command: npm run test
# =====================
# - name: Use Node.js ${{ matrix.node-version }}
# uses: actions/setup-node@v3
# with:
# cache: 'npm'
# build: npm run build
# start: npm start,npm run client
# wait-on: 'http://localhost:5000, http://localhost:3000'
# browser: chrome
# Install NPM dependencies, cache them correctly
# and run all Cypress tests
# - name: Cypress run
# with:
# build: npm run build
# start: npm run dev
# browser: chrome