-
Notifications
You must be signed in to change notification settings - Fork 393
244 lines (211 loc) · 9.03 KB
/
karma.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
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
name: Run Karma integration tests
on:
push:
branches:
- master
- release
- 'spring*'
- 'summer*'
- 'winter*'
pull_request:
branches:
- master
- release
- 'spring*'
- 'summer*'
- 'winter*'
env:
SAUCE_USERNAME: ${{secrets.SAUCE_USERNAME}}
SAUCE_ACCESS_KEY: ${{secrets.SAUCE_ACCESS_KEY}}
PUPPETEER_SKIP_DOWNLOAD: 'true' # only needed for @best/runner-local, unused here
GITHUB_RUN_ID: ${{github.run_id}}
COVERAGE: '1'
NODE_VERSION: '20.12.2'
jobs:
run-karma-tests-group-1:
runs-on: ubuntu-22.04
env:
SAUCE_TUNNEL_ID: github-action-tunnel-integration-${{github.run_id}}-group-1
defaults:
run:
working-directory: ./packages/@lwc/integration-karma
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'yarn'
- name: Install dependencies
run: yarn install --frozen-lockfile
working-directory: ./
- uses: saucelabs/sauce-connect-action@v2
with:
username: ${{ secrets.SAUCE_USERNAME }}
accessKey: ${{ secrets.SAUCE_ACCESS_KEY }}
tunnelName: ${{ env.SAUCE_TUNNEL_ID }}
- run: yarn sauce:ci
- run: DISABLE_SYNTHETIC=1 yarn sauce:ci
- run: LEGACY_BROWSERS=1 yarn sauce:ci
- run: FORCE_NATIVE_SHADOW_MODE_FOR_TEST=1 yarn sauce:ci
- run: DISABLE_NATIVE_CUSTOM_ELEMENT_LIFECYCLE=1 yarn sauce:ci
- run: DISABLE_NATIVE_CUSTOM_ELEMENT_LIFECYCLE=1 DISABLE_SYNTHETIC=1 yarn sauce:ci
- name: Upload coverage results
uses: actions/upload-artifact@v4
with:
name: coverage-report-group-1
path: ./packages/@lwc/integration-karma/coverage/**/coverage-final.json
run-karma-tests-group-2:
runs-on: ubuntu-22.04
env:
SAUCE_TUNNEL_ID: github-action-tunnel-integration-${{github.run_id}}-group-2
defaults:
run:
working-directory: ./packages/@lwc/integration-karma
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'yarn'
- name: Install dependencies
run: yarn install --frozen-lockfile
working-directory: ./
- uses: saucelabs/sauce-connect-action@v2
with:
username: ${{ secrets.SAUCE_USERNAME }}
accessKey: ${{ secrets.SAUCE_ACCESS_KEY }}
tunnelName: ${{ env.SAUCE_TUNNEL_ID }}
- run: API_VERSION=58 yarn sauce:ci
- run: API_VERSION=58 DISABLE_SYNTHETIC=1 yarn sauce:ci
- run: API_VERSION=59 yarn sauce:ci
- run: API_VERSION=59 DISABLE_SYNTHETIC=1 yarn sauce:ci
- run: API_VERSION=60 yarn sauce:ci
- run: API_VERSION=60 DISABLE_SYNTHETIC=1 yarn sauce:ci
- name: Upload coverage results
uses: actions/upload-artifact@v4
with:
name: coverage-report-group-2
path: ./packages/@lwc/integration-karma/coverage/**/coverage-final.json
run-karma-tests-group-3:
runs-on: ubuntu-22.04
env:
SAUCE_TUNNEL_ID: github-action-tunnel-integration-${{github.run_id}}-group-3
defaults:
run:
working-directory: ./packages/@lwc/integration-karma
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'yarn'
- name: Install dependencies
run: yarn install --frozen-lockfile
working-directory: ./
- uses: saucelabs/sauce-connect-action@v2
with:
username: ${{ secrets.SAUCE_USERNAME }}
accessKey: ${{ secrets.SAUCE_ACCESS_KEY }}
tunnelName: ${{ env.SAUCE_TUNNEL_ID }}
- run: API_VERSION=61 yarn sauce:ci
- run: API_VERSION=61 DISABLE_SYNTHETIC=1 yarn sauce:ci
- run: DISABLE_SYNTHETIC_SHADOW_SUPPORT_IN_COMPILER=1 DISABLE_SYNTHETIC=1 yarn sauce:ci
- run: DISABLE_SYNTHETIC_SHADOW_SUPPORT_IN_COMPILER=1 DISABLE_SYNTHETIC=1 DISABLE_STATIC_CONTENT_OPTIMIZATION=1 yarn sauce:ci
- run: ENABLE_ARIA_REFLECTION_GLOBAL_POLYFILL=1 yarn sauce:ci
- run: ENABLE_ARIA_REFLECTION_GLOBAL_POLYFILL=1 DISABLE_SYNTHETIC=1 yarn sauce:ci
- run: DISABLE_STATIC_CONTENT_OPTIMIZATION=1 yarn sauce:ci
- run: DISABLE_STATIC_CONTENT_OPTIMIZATION=1 DISABLE_SYNTHETIC=1 yarn sauce:ci
- name: Upload coverage results
uses: actions/upload-artifact@v4
with:
name: coverage-report-group-3
path: ./packages/@lwc/integration-karma/coverage/**/coverage-final.json
run-karma-tests-group-4:
runs-on: ubuntu-22.04
env:
SAUCE_TUNNEL_ID: github-action-tunnel-integration-${{github.run_id}}-group-4
defaults:
run:
working-directory: ./packages/@lwc/integration-karma
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'yarn'
- name: Install dependencies
run: yarn install --frozen-lockfile
working-directory: ./
- uses: saucelabs/sauce-connect-action@v2
with:
username: ${{ secrets.SAUCE_USERNAME }}
accessKey: ${{ secrets.SAUCE_ACCESS_KEY }}
tunnelName: ${{ env.SAUCE_TUNNEL_ID }}
- run: NODE_ENV_FOR_TEST=production yarn sauce:ci
- run: NODE_ENV_FOR_TEST=production DISABLE_SYNTHETIC=1 yarn sauce:ci
- run: yarn hydration:sauce:ci
- run: ENABLE_SYNTHETIC_SHADOW_IN_HYDRATION=1 yarn hydration:sauce:ci
- run: NODE_ENV_FOR_TEST=production yarn hydration:sauce:ci
- run: DISABLE_NATIVE_CUSTOM_ELEMENT_LIFECYCLE=1 yarn hydration:sauce:ci
- name: Upload coverage results
uses: actions/upload-artifact@v4
with:
name: coverage-report-group-4
path: ./packages/@lwc/integration-karma/coverage/**/coverage-final.json
run-karma-tests:
runs-on: ubuntu-22.04
defaults:
run:
working-directory: ./packages/@lwc/integration-karma
needs:
- run-karma-tests-group-1
- run-karma-tests-group-2
- run-karma-tests-group-3
- run-karma-tests-group-4
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'yarn'
- name: Install dependencies
run: yarn install --frozen-lockfile
working-directory: ./
- name: Download coverage results - group 1
uses: actions/download-artifact@v4
with:
name: coverage-report-group-1
path: ./packages/@lwc/integration-karma/coverage
- name: Download coverage results - group 2
uses: actions/download-artifact@v4
with:
name: coverage-report-group-2
path: ./packages/@lwc/integration-karma/coverage
- name: Download coverage results - group 3
uses: actions/download-artifact@v4
with:
name: coverage-report-group-3
path: ./packages/@lwc/integration-karma/coverage
- name: Download coverage results - group 4
uses: actions/download-artifact@v4
with:
name: coverage-report-group-4
path: ./packages/@lwc/integration-karma/coverage
- run: yarn coverage
- name: Upload combined coverage
uses: actions/upload-artifact@v4
with:
name: coverage-report-combined
path: ./packages/@lwc/integration-karma/coverage/combined
- name: Add markdown summary
run: awk '/<table/,/<\/table>/' ./coverage/combined/index.html >> $GITHUB_STEP_SUMMARY