GP cypress testing #23
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: 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 🧪 | |
env: | |
MONGO_URI: ${{secrets.MONGO_URI}} | |
PAGINATION_LIMIT: 3 | |
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 |