Skip to content

Introduce Cypress

Introduce Cypress #6

Workflow file for this run

name: Next.js E2E Tests
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
check:
name: E2E job with Cypress
runs-on: ubuntu-latest
env:
NEXT_PUBLIC_APP_URL: http://localhost:3000
UNILOGIN_SESSION_SECRET: XXX
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
fetch-depth: 0 # Required to retrieve git history
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
- name: Install dependencies
run: yarn install --frozen-lockfile --no-progress --non-interactive
- name: Build the Nextjs app and run Cypress tests
uses: cypress-io/github-action@v4
with:
install: false
build: yarn build
start: yarn start
wait-on: http://localhost:3000
runTests: yarn cypress:run
browser: chrome