forked from hashicorp/consul
-
Notifications
You must be signed in to change notification settings - Fork 0
230 lines (198 loc) · 6.29 KB
/
nightly-test-1.13.x.yaml
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
223
224
225
226
227
228
229
230
name: Nightly Test 1.13.x
on:
schedule:
- cron: '0 4 * * *'
workflow_dispatch: {}
env:
EMBER_PARTITION_TOTAL: 4 # Has to be changed in tandem with the matrix.partition
BRANCH: "release/1.13.x"
BRANCH_NAME: "release-1.13.x" # Used for naming artifacts
jobs:
frontend-test-workspace-node:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: ${{ env.BRANCH }}
# Not necessary to use yarn, but enables caching
- uses: actions/setup-node@v3
with:
node-version: 14
cache: 'yarn'
cache-dependency-path: ./ui/yarn.lock
- name: Install
id: install
working-directory: ./ui
run: make deps
- name: Workspace Tests
id: workspace-test
working-directory: ./ui
run: make test-workspace
- name: Node Tests
id: node-test
working-directory: ./ui/packages/consul-ui
run: make test-node
frontend-build-oss:
runs-on: ubuntu-latest
env:
JOBS: 2
CONSUL_NSPACES_ENABLED: 0
steps:
- uses: actions/checkout@v2
with:
ref: ${{ env.BRANCH }}
# Not necessary to use yarn, but enables caching
- uses: actions/setup-node@v3
with:
node-version: 14
cache: 'yarn'
cache-dependency-path: ./ui/yarn.lock
- name: Install
id: install
working-directory: ./ui
run: make deps
- name: Ember Build OSS
id: build-oss
working-directory: ./ui/packages/consul-ui
run: make build-ci
- name: Upload OSS Frontend
uses: actions/upload-artifact@v3
with:
name: frontend-oss-${{ env.BRANCH_NAME }}
path: ./ui/packages/consul-ui/dist
if-no-files-found: error
frontend-test-oss:
runs-on: ubuntu-latest
needs: [frontend-build-oss]
strategy:
matrix:
partition: [ 1, 2, 3, 4 ]
env:
CONSUL_NSPACES_ENABLED: 0
EMBER_TEST_REPORT: test-results/report-oss.xml #outputs test report for CircleCI test summary
EMBER_TEST_PARALLEL: true #enables test parallelization with ember-exam
steps:
- uses: actions/checkout@v2
with:
ref: ${{ env.BRANCH }}
# Not necessary to use yarn, but enables caching
- uses: actions/setup-node@v3
with:
node-version: 14
cache: 'yarn'
cache-dependency-path: ./ui/yarn.lock
- name: Install
id: install
working-directory: ./ui
run: make deps
- name: Download OSS Frontend
uses: actions/download-artifact@v3
with:
name: frontend-oss-${{ env.BRANCH_NAME }}
path: ./ui/packages/consul-ui/dist
- name: Ember Test OSS
id: cache
working-directory: ./ui/packages/consul-ui
run: node_modules/.bin/ember exam --split=$EMBER_PARTITION_TOTAL --partition=${{ matrix.partition }} --path dist --silent -r xunit
frontend-build-ent:
runs-on: ubuntu-latest
env:
JOBS: 2
CONSUL_NSPACES_ENABLED: 1
steps:
- uses: actions/checkout@v2
with:
ref: ${{ env.BRANCH }}
# Not necessary to use yarn, but enables caching
- uses: actions/setup-node@v3
with:
node-version: 14
cache: 'yarn'
cache-dependency-path: ./ui/yarn.lock
- name: Install
id: install
working-directory: ./ui
run: make deps
- name: Ember Build ENT
id: build-oss
working-directory: ./ui/packages/consul-ui
run: make build-ci
- name: Upload ENT Frontend
uses: actions/upload-artifact@v3
with:
name: frontend-ent-${{ env.BRANCH_NAME }}
path: ./ui/packages/consul-ui/dist
if-no-files-found: error
frontend-test-ent:
runs-on: ubuntu-latest
needs: [frontend-build-ent]
strategy:
matrix:
partition: [ 1, 2, 3, 4 ]
env:
CONSUL_NSPACES_ENABLED: 1
EMBER_TEST_REPORT: test-results/report-oss.xml #outputs test report for CircleCI test summary
EMBER_TEST_PARALLEL: true #enables test parallelization with ember-exam
steps:
- uses: actions/checkout@v2
with:
ref: ${{ env.BRANCH }}
# Not necessary to use yarn, but enables caching
- uses: actions/setup-node@v3
with:
node-version: 14
cache: 'yarn'
cache-dependency-path: ./ui/yarn.lock
- name: Install
id: install
working-directory: ./ui
run: make deps
- name: Download ENT Frontend
uses: actions/download-artifact@v3
with:
name: frontend-ent-${{ env.BRANCH_NAME }}
path: ./ui/packages/consul-ui/dist
- name: Ember Test ENT
id: cache
working-directory: ./ui/packages/consul-ui
run: node_modules/.bin/ember exam --split=$EMBER_PARTITION_TOTAL --partition=${{ matrix.partition }} --path dist --silent -r xunit
frontend-test-coverage-ent:
runs-on: ubuntu-latest
needs: [frontend-build-ent]
steps:
- uses: actions/checkout@v2
with:
ref: ${{ env.BRANCH }}
# Not necessary to use yarn, but enables caching
- uses: actions/setup-node@v3
with:
node-version: 14
cache: 'yarn'
cache-dependency-path: ./ui/yarn.lock
- name: Install
id: install
working-directory: ./ui
run: make deps
- name: Download ENT Frontend
uses: actions/download-artifact@v3
with:
name: frontend-ent-${{ env.BRANCH_NAME }}
path: ./ui/packages/consul-ui/dist
- name: Run ENT Code Coverage
working-directory: ./ui/packages/consul-ui
run: make test-coverage-ci
slack-failure-notification:
runs-on: ubuntu-latest
needs: [frontend-test-oss, frontend-test-ent]
if: ${{ failure() }}
steps:
- name: Slack Notification
id: slack
uses: slackapi/[email protected]
with:
payload: |
{
"message": "One or more nightly UI tests have failed on branch ${{ env.BRANCH }} for Consul. ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.CONSUL_UI_SLACK_WEBHOOK }}