forked from ag-grid/ag-grid
-
Notifications
You must be signed in to change notification settings - Fork 0
283 lines (263 loc) · 8.39 KB
/
doc-tests.yml
File metadata and controls
283 lines (263 loc) · 8.39 KB
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
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
name: Documentation Tests
description: Run tests for the documentation examples
env:
NX_NO_CLOUD: true
CI: true
DEFAULT_RETENTION_DAYS: 30
PREV_COMMIT_SHA_FILE: ./commit-sha.txt
CTRF_FILE: ./ctrf-report.json
SLACK_CHANNEL: '#ci-grid-gate'
AG_LIBRARY: grid
on:
schedule:
- cron: '30 2 * * *' # Run daily at 2:30am UTC. Temporarily enabled until full build is tested
workflow_dispatch:
inputs:
skip_vanilla:
description: 'Skip Vanilla tests'
type: boolean
required: true
default: true
skip_typescript:
description: 'Skip Typescript tests'
type: boolean
required: true
default: true
skip_reactFunctionalTs:
description: 'Skip React Functional TS tests'
type: boolean
required: true
default: true
skip_angular:
description: 'Skip Angular tests'
type: boolean
required: true
default: true
skip_vue3:
description: 'Skip Vue3 tests'
type: boolean
required: true
default: true
skip_recipes:
description: 'Skip Recipe tests'
type: boolean
required: true
default: true
test_pattern:
description: 'Run only tests matching this pattern'
type: string
required: false
default: ''
base_url:
description: 'Override base URL'
type: string
required: false
default: 'https://grid-staging.ag-grid.com/'
notify:
description: 'Notify Slack channel'
type: boolean
default: true
required: true
force_jira_ticket:
description: 'Force create a Jira ticket even if the run is not scheduled'
type: boolean
default: false
required: true
permissions:
contents: read
actions: read
jobs:
test-vanilla:
if: ${{ github.event.inputs.skip_vanilla != 'true' }}
name: Test vanilla Examples
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
shardIndex: [1]
shardTotal: [1]
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/test-framework-examples
with:
base_url: ${{github.event.inputs.base_url}}
framework: vanilla
browsers: all
test_pattern: ${{github.event.inputs.test_pattern}}
test-typescript:
if: ${{ github.event.inputs.skip_typescript != 'true' }}
name: Test typescript Examples
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
shardIndex: [1]
shardTotal: [1]
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/test-framework-examples
with:
base_url: ${{github.event.inputs.base_url}}
framework: typescript
browsers: chromium
test_pattern: ${{github.event.inputs.test_pattern}}
test-reactFunctionalTs:
if: ${{ github.event.inputs.skip_reactFunctionalTs != 'true' }}
name: Test reactFunctionalTs Examples
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
shardIndex: [1, 2]
shardTotal: [2]
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/test-framework-examples
with:
base_url: ${{github.event.inputs.base_url}}
framework: reactFunctionalTs
browsers: all
test_pattern: ${{github.event.inputs.test_pattern}}
test-vue3:
if: ${{ github.event.inputs.skip_vue3 != 'true' }}
name: Test vue3 Examples
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
shardIndex: [1]
shardTotal: [1]
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/test-framework-examples
with:
base_url: ${{github.event.inputs.base_url}}
framework: vue3
browsers: chromium
test_pattern: ${{github.event.inputs.test_pattern}}
test-angular:
if: ${{ github.event.inputs.skip_angular != 'true' }}
name: Test angular Examples
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
shardIndex: [1, 2]
shardTotal: [2]
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/test-framework-examples
with:
base_url: ${{github.event.inputs.base_url}}
framework: angular
browsers: chromium
test_pattern: ${{github.event.inputs.test_pattern}}
test-recipes:
if: ${{ github.event.inputs.skip_recipes != 'true' }}
name: Test Public Testing Recipes
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Setup
id: setup
uses: ./.github/actions/setup-nx
with:
cache_mode: ro
- name: Run Public Testing Recipes
run: yarn nx run ag-grid-public-e2e-testing-recipes:test:recipes -c staging
- name: Upload Test Report
id: upload-recipes-report
uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
name: playwright-report-recipes
path: reports/
retention-days: ${{env.DEFAULT_RETENTION_DAYS}}
publish-reports:
if: always()
needs:
- test-reactFunctionalTs
- test-angular
- test-typescript
- test-vanilla
- test-vue3
- test-recipes
env:
IS_SUCCESS: ${{ needs.test-angular.result != 'failure' && needs.test-reactFunctionalTs.result != 'failure' && needs.test-typescript.result != 'failure' && needs.test-vanilla.result != 'failure' && needs.test-vue3.result != 'failure' && needs.test-recipes.result != 'failure' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Download all test reports
uses: actions/download-artifact@v4
with:
path: combined-reports
- name: Publish Combined Test Report
id: ctrf
uses: ctrf-io/github-test-reporter@v1.0.17
with:
report-path: 'combined-reports/**/*.json'
summary-report: true
failed-report: true
flaky-report: true
skipped-report: false
write-ctrf-to-file: ${{ env.CTRF_FILE }}
- name: Get previous run commit SHA
id: prev-commit-sha
uses: actions/cache/restore@v4
with:
restore-keys: |
doc-tests-prev-commit-
doc-tests-prev-commit-${{ github.ref }}
path: ${{ env.PREV_COMMIT_SHA_FILE }}
key: doc-tests-prev-commit-${{ github.ref }}-${{ github.sha }}
- name: Load files into environment
continue-on-error: true
run: |
if [ -f ${{ env.PREV_COMMIT_SHA_FILE }} ]; then
{
echo 'PREV_COMMIT_SHA<<EOF'
cat ${{ env.PREV_COMMIT_SHA_FILE }}
echo 'EOF'
} >> $GITHUB_ENV
else
echo 'PREV_COMMIT_SHA_FILE not found'
fi
- name: Slack Notification
if: ${{ github.event_name == 'schedule' || inputs.notify }}
continue-on-error: true
uses: ./external/ag-shared/github/actions/slack-integration
with:
AG_LIBRARY: ${{ env.AG_LIBRARY }}
CTRF_REPORT_FILE: ${{ env.CTRF_FILE }}
SLACK_BOT_OAUTH_TOKEN: ${{ secrets.SLACK_BOT_OAUTH_TOKEN }}
SLACK_CHANNEL: ${{ env.SLACK_CHANNEL }}
PREV_COMMIT_SHA: ${{ env.PREV_COMMIT_SHA }}
CURRENT_COMMIT_SHA: ${{ github.sha }}
IS_SUCCESS: ${{ env.IS_SUCCESS }}
- name: Create Jira Ticket
uses: ./.github/actions/jira-integration
continue-on-error: true
if: ${{ github.event_name == 'schedule' || inputs.force_jira_ticket }}
with:
JIRA_API_AUTH: ${{ secrets.JIRA_API_AUTH }}
JIRA_SUMMARY: "[NR] CI/CD workflow '${{ github.workflow }}' is failing."
CTRF_REPORT_FILE: ${{ env.CTRF_FILE }}
PREV_COMMIT_SHA: ${{ env.PREV_COMMIT_SHA }}
CURRENT_COMMIT_SHA: ${{ github.sha }}
IS_SUCCESS: ${{ env.IS_SUCCESS }}
- name: Set commit SHA
id: set-commit-sha
run: |
echo ${{ github.sha }} > ${{ env.PREV_COMMIT_SHA_FILE }}
- name: Save Current Commit Hash
uses: actions/cache/save@v4
with:
path: ${{ env.PREV_COMMIT_SHA_FILE }}
key: ${{ steps.prev-commit-sha.outputs.cache-primary-key }}