-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (36 loc) · 987 Bytes
/
e2e-test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
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