forked from StateVoicesNational/Spoke
-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (63 loc) · 1.6 KB
/
cypress-tests.yaml
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: Integration Tests
on: [push]
jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 10
strategy:
matrix:
node-version: [16.x]
services:
redis:
image: redis
ports:
- 6379:6379
postgres:
image: postgres:10
env:
POSTGRES_USER: spoke_test
POSTGRES_PASSWORD: spoke_test
POSTGRES_DB: spoke_test
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- name: Cypress run
uses: cypress-io/github-action@v4
env:
DEBUG: '@cypress/github-action'
NODE_ENV: test
PORT: 3001
OUTPUT_DIR: ./build
ASSETS_DIR: ./build/client/assets
ASSETS_MAP_FILE: assets.json
DB_TYPE: pg
DB_NAME: spoke_test
DB_USER: spoke_test
DB_PASSWORD: spoke_test
SESSION_SECRET: secret
DEFAULT_SERVICE: fakeservice
JOBS_SAME_PROCESS: 1
JOBS_SYNC: 1
TASKS_SYNC: 1
PASSPORT_STRATEGY: local
PHONE_INVENTORY: 1
with:
browser: chrome
build: npm run prod-build
start: npm start
wait-on: 'http://localhost:3001'
- uses: actions/upload-artifact@v2
if: failure()
with:
name: cypress-screenshots
path: cypress/screenshots
- uses: actions/upload-artifact@v2
if: failure()
with:
name: cypress-videos
path: cypress/videos