-
Notifications
You must be signed in to change notification settings - Fork 2
53 lines (40 loc) · 1.13 KB
/
frontend-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
name: frontend-test
on:
workflow_dispatch:
push:
paths:
- 'frontend/**'
- '!frontend/con10t/**'
branches:
- main
- stable
defaults:
run:
working-directory: frontend
env:
TEST_SERVER: bogusman02.dai-cloud.uni-koeln.de
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Cache npm modules
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install npm dependencies
run: npm i
- name: Run unit tests
run: npm run test
# - name: Set backend URI to test server
# run: sed -i 's/document.location.host/\"'"${{ env.TEST_SERVER }}"'\"/' app/app.js
# - name: Start dev server (in background)
# run: npm start &
# - name: Run e2e tests
# run: xvfb-run -n 97 npm run e2e
# - name: Reset backend URI
# run: sed -i 's/\"'"${{ env.TEST_SERVER }}"'\"/document.location.host/' app/app.js