-
Notifications
You must be signed in to change notification settings - Fork 1
64 lines (52 loc) · 1.7 KB
/
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: Test
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Cache node_modules
id: cache-node-modules
uses: actions/cache@v2
with:
path: Frontend/node_modules
key: node-modules-${{ hashFiles('Frontend/package-lock.json') }}
- name: Install Dependencies
working-directory: Frontend
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: npm ci
- name: Unit Test
working-directory: Frontend
run: npm run unit_test
- name: Install Chrome
run: wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb && sudo apt install ./google-chrome-stable_current_amd64.deb
- name: Start CouchDB
run: docker compose up -d couchdb
- name: Wait for CouchDB
uses: iFaxity/wait-on-action@v1
with:
resource: http://127.0.0.1:5984
delay: 500
- name: Insert Testdata
run: docker compose up testdata_generator
- name: Run cypress integration tests
uses: cypress-io/github-action@v2
with:
working-directory: "./Frontend"
command: npm run integration_test_cypress:run
browser: chrome
record: true
- name: Upload cypress failure screenshots
uses: actions/upload-artifact@v2
if: failure()
with:
name: cypress-screenshots
path: Frontend/cypress/screenshots
- name: Run selenium integration tests
working-directory: Frontend
run: npm run integration_test_selenium