-
Notifications
You must be signed in to change notification settings - Fork 167
222 lines (179 loc) · 6.81 KB
/
it-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
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
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
name: "CI :: Integration Tests"
on:
pull_request:
branches: "**"
jobs:
chrome-extension-tests-it:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
node: [12.16.3]
yarn: [1.19.1]
steps:
- uses: actions/checkout@v2
- run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
- name: Setup Node
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}
- name: Setup Yarn
run: |
npm install -g yarn@${{ matrix.yarn }}
yarn config set network-timeout 1000000
- name: Start Xvfb (Ubuntu only)
if: matrix.os == 'ubuntu-latest'
run: /usr/bin/Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
- name: Download dependencies
run: yarn run init
- name: Build repository
run: yarn run build:fast
- name: Increase inotify watches
if: matrix.os == 'ubuntu-latest'
run: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
# Starts and waits for servers and runs integrations tests
- name: Run integration tests
env:
DISPLAY: ":99.0"
run: |
cd packages/online-editor && yarn run start &
cd packages/chrome-extension-pack-kogito-kie-editors && yarn run serve-envelope &
sleep 20
cd packages/chrome-extension-pack-kogito-kie-editors && yarn run test:it
- name: Archive it test screenshots
if: success() || failure()
uses: actions/upload-artifact@v1
with:
name: chrome-extension-it-tests-screenshots-${{ matrix.os }}
path: packages/chrome-extension-pack-kogito-kie-editors/screenshots
- name: Archive it test logs
if: success() || failure()
uses: actions/upload-artifact@v1
with:
name: chrome-extension-it-tests-logs-${{ matrix.os }}
path: packages/chrome-extension-pack-kogito-kie-editors/logs
online-editor-tests-it:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
node: [12.16.3]
yarn: [1.19.1]
steps:
- uses: actions/checkout@v2
- run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
- name: Setup Node
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}
- name: Setup Yarn
run: |
npm install -g yarn@${{ matrix.yarn }}
yarn config set network-timeout 1000000
- name: Download dependencies
run: yarn run init
- name: Increase inotify watches
if: matrix.os == 'ubuntu-latest'
run: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
- name: Build repository
run: npx lerna run build:prod --scope '@kogito-tooling/online-editor' --include-dependencies
- name: Run integration tests
run: npx lerna run test:it --scope '@kogito-tooling/online-editor' --stream
- name: Archive it test screenshots
if: failure()
uses: actions/upload-artifact@v1
with:
name: online-editor-it-tests-screenshots-${{ matrix.os }}
path: packages/online-editor/it-tests/screenshots
- name: Archive it test videos
if: failure()
uses: actions/upload-artifact@v1
with:
name: online-editor-it-tests-videos-${{ matrix.os }}
path: packages/online-editor/it-tests/videos
kie-editors-standalone-tests-it:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
node: [12.16.3]
yarn: [1.19.1]
steps:
- uses: actions/checkout@v2
- run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
- name: Setup Node
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}
- name: Setup Yarn
run: |
npm install -g yarn@${{ matrix.yarn }}
yarn config set network-timeout 1000000
- name: Start Xvfb (Ubuntu only)
if: matrix.os == 'ubuntu-latest'
run: /usr/bin/Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
- name: Download dependencies
run: yarn run init
- name: Build repository
run: npx lerna run build:prod --scope '@kogito-tooling/kie-editors-standalone' --include-dependencies
- name: Build testing app
run: npx lerna run build:it --scope '@kogito-tooling/kie-editors-standalone'
- name: Run tests
run: npx lerna run test:it --scope '@kogito-tooling/kie-editors-standalone'
- name: Archive test results
if: failure()
uses: actions/upload-artifact@v2
with:
name: junit-kie-editors-standalone-${{ matrix.os }}.xml
path: "packages/kie-editors-standalone/it-tests/results/junit.xml"
- name: Archive test screenshots
if: failure()
uses: actions/upload-artifact@v1
with:
name: kie-editors-standalone-it-tests-screenshots-${{ matrix.os }}
path: packages/kie-editors-standalone/it-tests/cypress/screenshots
- name: Archive test videos
if: failure()
uses: actions/upload-artifact@v1
with:
name: kie-editors-standalone-it-tests-videos-${{ matrix.os }}
path: packages/kie-editors-standalone/it-tests/cypress/videos
vscode-extension-tests-it:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
node: [12.16.3]
yarn: [1.19.1]
steps:
- uses: actions/checkout@v2
- run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
- name: Setup Node
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}
- name: Setup Yarn
run: |
npm install -g yarn@${{ matrix.yarn }}
yarn config set network-timeout 1000000
- name: Start Xvfb (Ubuntu only)
if: matrix.os == 'ubuntu-latest'
run: /usr/bin/Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
- name: Download dependencies
run: yarn run init
- name: Build repository
run: npx lerna run build:prod --scope 'vscode-extension-pack-kogito-kie-editors' --include-dependencies
- name: Run tests
run: npx lerna run test:it --scope 'vscode-extension-pack-kogito-kie-editors'
env:
DISPLAY: ":99.0"
- name: Archive test results
if: failure()
uses: actions/upload-artifact@v2
with:
name: junit-kie-editors-vscode-${{ matrix.os }}.xml
path: "packages/vscode-extension-pack-kogito-kie-editors/it-tests/results/junit.xml"