-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (41 loc) · 1.11 KB
/
ci.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
42
43
44
45
46
name: E2E Tests
on:
push:
branches:
- "**"
env:
STRAVA_ADMIN_ID: ${{ secrets.STRAVA_ADMIN_ID }}
STRAVA_CLIENT_SECRET: ${{ secrets.STRAVA_CLIENT_SECRET }}
MONGODB_URI: ${{ secrets.MONGODB_URI }}
SESSION_SECRET: ${{ secrets.SESSION_SECRET }}
jobs:
e2e:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: npm install
working-directory: ./web
- name: Build project
run: npm run build
working-directory: ./web
- name: Start server
run: npm start &
working-directory: ./web
env:
CI: true
- name: Wait for Next.js to start
run: npx wait-on http://localhost:3000
working-directory: ./web
- name: Run Cypress tests
run: npm run cy:run
working-directory: ./web
- name: Stop Next.js server
run: pkill -f 'next start'