-
Notifications
You must be signed in to change notification settings - Fork 173
133 lines (122 loc) · 3.34 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
on:
push:
branches:
- 'main'
pull_request:
branches:
- 'main'
name: Build & Test
env:
CYPRESS_CACHE_FOLDER: ~/cypress-binary-cache
jobs:
prepare:
uses: ./.github/workflows/prepare.yml
secrets: inherit
with:
buildcache_key: buildcache
unit:
name: Unit Tests
needs: prepare
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v3
with:
node-version: '18.15.0'
- uses: actions/cache@v3
with:
path: |
~/tmp_build
~/cypress-binary-cache
key: buildcache
- run: cp -r ~/tmp_build/* .
- run: npm test --prefix core || exit 1
mock_engine:
name: Mock Engine Tests
runs-on: ubuntu-latest
needs: prepare
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '18.15.0'
- uses: actions/cache@v3
with:
path: |
~/tmp_build
~/cypress-binary-cache
key: buildcache
- run: cp -r ~/tmp_build/* .
- run: npm i -g cypress
- run: npm i -g [email protected]
- run: npm i -g live-server
- run: bash ./test/mockengine.sh || exit 1
container_unit_tests:
name: Container Unit Tests
runs-on: ubuntu-latest
needs: prepare
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '18.15.0'
- uses: actions/cache@v3
with:
path: |
~/tmp_build
~/cypress-binary-cache
key: buildcache
- run: cp -r ~/tmp_build/* .
- run: npm test --prefix container || exit 1
container_e2e_tests:
name: Container E2E Tests
runs-on: ubuntu-latest
needs: prepare
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '18.15.0'
- uses: actions/cache@v3
with:
path: |
~/tmp_build
~/cypress-binary-cache
key: buildcache
- run: cp -r ~/tmp_build/* .
- run: bash ./container/run-container-e2e.sh || exit 1
e2e:
name: Integration Tests
needs: prepare
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v3
with:
node-version: '18.15.0'
- uses: actions/cache@v3
with:
path: |
~/tmp_build
~/cypress-binary-cache
key: buildcache
- run: cp -r ~/tmp_build/* .
- run: sudo apt-get install libgconf-2-4 libgtk2.0-0 libgtk-3-0 libgbm-dev libnotify-dev libgconf-2-4 libnss3 libxss1 libasound2 libxtst6 xauth xvfb
- run: npm install --prefix test/e2e-test-application @babel/plugin-proposal-class-properties
- run: ls test
- run: bash ./test/e2e-js.sh || exit 1
- run: bash ./test/e2e-angular.sh || exit 1
cleanup:
needs: [e2e, container_unit_tests, container_e2e_tests, mock_engine, unit]
uses: ./.github/workflows/cleanup.yml
secrets: inherit
with:
buildcache_key: buildcache
docu_check:
name: Check Documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '18.15.0'
- run: cd ./scripts && npm ci
- run: bash ./scripts/docuCheck.sh