-
Notifications
You must be signed in to change notification settings - Fork 59
76 lines (66 loc) · 1.93 KB
/
e2e-ui-tests.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
name: Run E2E Backend + Frontend Tests
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
build:
runs-on: ubuntu-22.04
env:
CYPRESS_TESTING: true
NODE_ENV: test
services:
postgres:
image: postgres:latest
env:
POSTGRES_PASSWORD: postgres
ports:
- 5432:5432
ldap:
image: rroemhild/test-openldap
ports:
- 10389:10389
splunk:
image: splunk/splunk
volumes:
- /$(pwd)/test/configs/splunk/server.conf:/etc/system/local/server.conf
ports:
- 8089:8089
env:
SPLUNK_START_ARGS: --accept-license
SPLUNK_PASSWORD: Valid_password!
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "18"
check-latest: true
cache: 'yarn'
- name: Install project dependencies
run: yarn install --frozen-lockfile
- name: Copy .env-ci to .env
run: cp apps/backend/test/.env-ci apps/backend/.env
- name: Create/migrate db
run: |
yarn backend sequelize-cli db:create
yarn backend sequelize-cli db:migrate
yarn backend sequelize-cli db:seed:all
- name: Build Heimdall
run: yarn build
env:
NODE_ENV: production # want to install dev deps like cypress but test against the prod build of Heimdall
- name: Cypress run
uses: cypress-io/github-action@v6
with:
start: yarn start, yarn run cypress-test mock-json, yarn run cypress-test mock-openid
wait-on: 'http://127.0.0.1:3000, http://127.0.0.1:3001'
- name: Upload test screenshots and videos
if: failure()
uses: actions/upload-artifact@v4
with:
name: cypress-recording
path: |
test/screenshots
test/videos