forked from ag-grid/ag-grid
-
Notifications
You must be signed in to change notification settings - Fork 0
671 lines (606 loc) · 23.9 KB
/
ci.yml
File metadata and controls
671 lines (606 loc) · 23.9 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
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
name: CI
on:
push:
branches:
- 'latest'
- 'b[0-9][0-9]?.[0-9][0-9]?.[0-9][0-9]?'
pull_request:
branches:
- 'latest'
- 'next'
- 'b[0-9][0-9]?.[0-9][0-9]?.[0-9][0-9]?'
types: [opened, synchronize, reopened, ready_for_review]
workflow_dispatch:
inputs:
skip_docs:
description: 'Skip docs build & link checker'
type: boolean
default: false
required: true
run_package_tests:
description: 'Run package tests'
type: boolean
default: false
required: true
nx_command:
type: 'choice'
required: true
default: 'affected'
options:
- 'affected'
- 'run-many'
env:
NX_NO_CLOUD: true
NX_BRANCH: ${{ github.ref }}
NX_COMMAND_TYPE: ${{ github.event.inputs.nx_command }}
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
SLACK_CHANNEL: '#ci-grid-gate'
AG_LIBRARY: grid
SHARP_IGNORE_GLOBAL_LIBVIPS: true
YARN_REGISTRY: "https://registry.ag-grid.com"
CI: true
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/latest' }}
permissions:
contents: read
actions: read
jobs:
detect-changes:
runs-on: ubuntu-24.04
name: Detect Changes
outputs:
run_full_ci: ${{ steps.decide.outputs.run_full_ci }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Detect file changes (PR only)
id: filter
if: github.event_name == 'pull_request'
uses: dorny/paths-filter@v3
with:
filters: |
code:
- 'packages/**'
- 'plugins/**'
- 'community-modules/**'
- 'testing/**'
- 'external/ag-website-shared/**'
- 'external/ag-shared/scripts/**'
- 'external/ag-shared/github/**'
- 'external/ag-shared/src/**'
- 'external/ag-shared/tools/**'
- 'external/ag-shared/*.json'
- '*.json'
- '*.ts'
- '*.js'
- '*.cjs'
- '*.mjs'
- 'yarn.lock'
- 'nx.json'
- 'tsconfig.*.json'
- 'jest.preset.js'
ci:
- '.github/**'
- name: Decide what to run
id: decide
run: |
# Always run full CI for push events and manual triggers
if [[ "${{ github.event_name }}" != "pull_request" ]]; then
echo "run_full_ci=true" >> $GITHUB_OUTPUT
echo "Non-PR event (${{ github.event_name }}), running full CI"
exit 0
fi
# For PRs, check if code or CI files changed
if [[ "${{ steps.filter.outputs.code }}" == "true" ]] || \
[[ "${{ steps.filter.outputs.ci }}" == "true" ]]; then
echo "run_full_ci=true" >> $GITHUB_OUTPUT
echo "Code or CI changes detected (code=${{ steps.filter.outputs.code }}, ci=${{ steps.filter.outputs.ci }}), running full CI"
else
echo "run_full_ci=false" >> $GITHUB_OUTPUT
echo "Only non-code changes detected, running lint only"
fi
init:
name: Initialise Workflow
needs: detect-changes
if: github.event.pull_request.draft == false && needs.detect-changes.outputs.run_full_ci == 'true'
permissions:
contents: write
outputs:
nx_base: ${{ steps.setup.outputs.base }}
build_type: ${{ steps.setup.outputs.type }}
snapshot_branch: ${{ steps.snapshot-prepare.outputs.branch }}
runs-on: ubuntu-latest
steps:
- name: Checkout
id: checkout
uses: actions/checkout@v4
with:
fetch-depth: 1 # shallow copy
- name: Fetch Refs
run: |
git fetch origin --depth 1 latest
git fetch origin --depth 1 tag latest-success
- name: Setup
id: setup
uses: ./.github/actions/setup-nx
with:
cache_mode: 'rw'
- name: Prepare Snapshot Branch
uses: ./.github/actions/snapshot-prepare
id: snapshot-prepare
calc_matrix:
name: Calculate Github Matrix
needs: [detect-changes, init]
if: needs.detect-changes.outputs.run_full_ci == 'true'
outputs:
test_count: ${{ steps.matrix.outputs.test_count }}
test_matrix: ${{ steps.matrix.outputs.test_matrix }}
test_pkg_matrix: ${{ steps.matrix.outputs.pkg_matrix }}
e2e_test_count: ${{ steps.matrix.outputs.e2e_test_count }}
e2e_test_matrix: ${{ steps.matrix.outputs.e2e_test_matrix }}
bundle_test_count: ${{ steps.matrix.outputs.bundle_test_count }}
bundle_test_matrix: ${{ steps.matrix.outputs.bundle_test_matrix }}
runs-on: ubuntu-latest
steps:
- name: Checkout
id: checkout
uses: actions/checkout@v4
with:
fetch-depth: 1 # shallow copy
- name: Fetch Refs
run: |
git fetch origin --depth 1 latest
git fetch origin --depth 1 tag latest-success
- name: Setup
id: setup
uses: ./.github/actions/setup-nx
with:
cache_mode: ro
- name: Calculate Matrix
id: matrix
run: |
if [[ "${{ github.event.inputs.nx_command || 'affected' }}" == "run-many" ]] ; then
count=10
else
count=$(yarn -s nx show projects --affected --base ${{ steps.setup.outputs.base }} -t test | wc -l)
fi
matrix=$(node ./external/ag-shared/scripts/shard/calculate-shards.js eval --ratio 1 --zero ${count} --max 1)
echo "test_matrix=${matrix}" >> $GITHUB_OUTPUT
echo "test_count=${count}" >> $GITHUB_OUTPUT
echo "Test matrix determined to be: ${matrix} (test_count=${count})"
if [[ "${{ github.event.inputs.nx_command || 'affected' }}" == "run-many" ]] ; then
e2e_count=10
else
e2e_count=$(yarn -s nx show projects --affected --base ${{ steps.setup.outputs.base }} -t test:e2e --exclude 'tag:module-size' --exclude all | wc -l)
fi
# not enough non-bundle size e2e tests to shard atm
e2e_matrix={"shard":[0]}
echo "e2e_test_matrix=${e2e_matrix}" >> $GITHUB_OUTPUT
echo "e2e_test_count=${e2e_count}" >> $GITHUB_OUTPUT
echo "e2e Test matrix determined to be: ${e2e_matrix} (e2e_test_count=${e2e_count})"
# 3 is optimal atm for bundle tests
bundle_count=3
bundle_matrix=$(node ./external/ag-shared/scripts/shard/calculate-shards.js eval --ratio 1 --zero ${bundle_count})
echo "bundle_test_matrix=${bundle_matrix}" >> $GITHUB_OUTPUT
echo "bundle_test_count=${bundle_count}" >> $GITHUB_OUTPUT
echo "bundle Test matrix determined to be: ${bundle_matrix} (bundle_test_count=${bundle_count})"
pkg_matrix=$(node ./external/ag-shared/scripts/shard/calculate-pkg-shards.js)
echo "pkg_matrix=${pkg_matrix}" >> $GITHUB_OUTPUT
echo "Package test matrix determined to be: ${pkg_matrix}"
test:
runs-on: ubuntu-24.04
name: Unit Tests (${{ matrix.shard }}/${{ strategy.job-total }})
needs: [detect-changes, calc_matrix]
if: needs.detect-changes.outputs.run_full_ci == 'true' && needs.calc_matrix.outputs.test_count > 0
strategy:
matrix: ${{ fromJson(needs.calc_matrix.outputs.test_matrix )}}
fail-fast: false
env:
NX_PARALLEL: 1
NX_BASE: ${{ needs.init.outputs.nx_base }}
steps:
- name: Checkout
id: checkout
uses: actions/checkout@v4
with:
fetch-depth: 1 # shallow copy
- name: Fetch Refs
run: |
git fetch origin --depth 1 latest
git fetch origin --depth 1 tag latest-success
- name: Setup
id: setup
uses: ./.github/actions/setup-nx
with:
cache_mode: ro
- name: nx test
if: matrix.shard != 0
id: test
run: yarn nx ${{ github.event.inputs.nx_command || 'affected' }} -t test -c=staging --exclude tag:no-sharding --exclude all --shard=${{ matrix.shard }}/$((${{ strategy.job-total }} - 1))
- name: nx test (non-sharded)
if: matrix.shard == 0
id: test-no-shard
run: yarn nx ${{ github.event.inputs.nx_command || 'affected' }} -t test -c staging --exclude '*,!tag:no-sharding'
- name: nx pack:verify
if: matrix.shard == 0
id: pack-verify
run: |
yarn nx ${{ github.event.inputs.nx_command || 'affected' }} -t pack:verify --prod
- name: Assert No Debugger
if: matrix.shard == 0
id: assertNoDebugger
run: |
./scripts/assertNoDebugger.sh
- name: Persist test results
if: always() && matrix.shard != 0
uses: actions/upload-artifact@v4
with:
name: test-results-${{matrix.shard}}
path: |
reports/
packages/**/__diff_output__/*
e2e:
runs-on: ubuntu-latest
name: e2e Tests
needs: [detect-changes, calc_matrix]
if: needs.detect-changes.outputs.run_full_ci == 'true' && needs.calc_matrix.outputs.e2e_test_count > 0
strategy:
matrix: ${{ fromJson(needs.calc_matrix.outputs.e2e_test_matrix )}}
fail-fast: false
env:
NX_PARALLEL: 1
NX_BASE: ${{ needs.init.outputs.nx_base }}
steps:
- name: Checkout
id: checkout
uses: actions/checkout@v4
with:
fetch-depth: 1 # shallow copy
- name: Setup
id: setup
uses: ./.github/actions/setup-nx
with:
cache_mode: ro
- name: nx test:e2e
id: tests
run: yarn nx ${{ github.event.inputs.nx_command || 'affected' }} -t test:e2e -c staging --exclude 'tag:module-size' --exclude all
- name: Persist test results
if: always() && matrix.shard != 0
uses: actions/upload-artifact@v4
with:
name: test-results-e2e-shard-${{matrix.shard}}
path: |
reports/
format_lint_build:
runs-on: ubuntu-latest
name: Format, Lint and Build
needs: [detect-changes, init]
if: ${{ always() && needs.detect-changes.result == 'success' && (needs.init.result == 'success' || needs.init.result == 'skipped') }}
outputs:
format: ${{ steps.format.outcome || '' }}
lint: ${{ steps.lint.outcome || '' }}
build: ${{ steps.build.outcome || '' }}
steps:
- name: Checkout
id: checkout
uses: actions/checkout@v4
with:
fetch-depth: 1 # shallow copy
- name: Setup
id: setup
uses: ./.github/actions/setup-nx
with:
cache_mode: ro
- name: nx format:check
id: format
if: steps.setup.outcome == 'success' || steps.setup.outcome == 'skipped'
run: |
if [[ "${{ github.event.inputs.nx_command || 'affected' }}" == "run-many" ]] ; then
yarn nx format:check --all
else
yarn nx format:check --base ${{ steps.setup.outputs.base }}
fi
- name: nx lint
id: lint
run: |
yarn nx lint
- name: nx build
id: build
if: needs.detect-changes.outputs.run_full_ci == 'true'
run: |
yarn nx run-many --t build -c staging --exclude ag-grid-docs --exclude all
docs:
runs-on: ubuntu-latest
name: Docs Build & Link Checker
needs: [detect-changes, init]
if: ${{ needs.detect-changes.outputs.run_full_ci == 'true' && needs.init.result == 'success' && !inputs.skip_docs }}
strategy:
fail-fast: false
env:
NX_BASE: ${{ needs.init.outputs.nx_base }}
outputs:
docs_deployed: ${{ steps.deploy_to_staging.outcome }}
steps:
- name: Checkout
id: checkout
uses: actions/checkout@v4
with:
fetch-depth: 1 # shallow copy
- name: Setup
id: setup
uses: ./.github/actions/setup-nx
with:
cache_mode: ro
- name: update base url
run: node scripts/deployments/prep_and_archive/updateBaseUrl.js staging
- name: validate grid modules
run: node scripts/deployments/validateGridModulesList.js
- name: docs build and link checker
run: CHECK_LINKS=true CHECK_REDIRECTS=true yarn nx run ag-grid-docs:build -c staging
- name: validate base url
run: node scripts/deployments/sanityCheckBaseUrl.js staging
- name: Deploy to Staging
id: deploy_to_staging
if: ${{ github.ref == 'refs/heads/latest' }}
env:
SSH_PRIVATE_KEY: |
${{ secrets.STAGING_SSH_KEY }}
SSH_HOST: ${{ secrets.STAGING_HOST }}
SSH_USER: ubuntu
SSH_KEY_LOCATION: ${{ github.workspace }}/staging.pem
WWW_ROOT_DIR: ${{ vars.WWW_ROOT_DIR }}
run: |
echo "$SSH_PRIVATE_KEY" > $SSH_KEY_LOCATION
chmod 400 $SSH_KEY_LOCATION
./scripts/deployments/createAndDeployDocsToTCGH.sh
- name: Persist test results
if: always()
uses: actions/upload-artifact@v4
with:
name: test-results-docs
path: |
reports/
fw_pkg_test:
runs-on: ubuntu-24.04
name: Framework Package Tests (${{ matrix.framework }})
permissions:
contents: write
needs: [calc_matrix, init]
if: (needs.init.outputs.build_type == 'latest' || needs.init.outputs.build_type == 'release') || inputs.run_package_tests
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.calc_matrix.outputs.test_pkg_matrix )}}
env:
NX_BASE: ${{ needs.init.outputs.nx_base }}
steps:
- name: Checkout
id: checkout
if: matrix.framework != 'none'
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Setup
id: setup
if: matrix.framework != 'none'
uses: ./.github/actions/setup-nx
with:
cache_mode: ro
- name: nx package:test
id: package-test
if: matrix.framework != 'none'
run: yarn nx run-many -t test:package -p ${{ matrix.framework }}-package-tests --configuration=update
- name: Snapshot Branch
if: matrix.framework != 'none'
uses: ./.github/actions/snapshot-branch
with:
path: testing/*-package-tests/e2e/*-snapshots/
source_branch: ${{ github.head_ref || 'latest' }}
branch: ${{ needs.init.outputs.snapshot_branch }}
type: ${{ matrix.framework }}-package-tests:test:package
report:
runs-on: ubuntu-24.04
needs: [ detect-changes, init, test, e2e, format_lint_build, docs, calc_matrix, fw_pkg_test, sonar_community, sonar_enterprise ]
if: cancelled() != true && github.event.pull_request.draft == false
permissions:
contents: write
actions: read
checks: write
steps:
- name: Checkout
id: checkout
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Setup
id: setup
uses: ./.github/actions/setup-nx
with:
cache_mode: ro
- name: Fetch Refs
run: |
git fetch origin --depth 1 latest
git fetch origin --depth 1 tag latest-success
- uses: actions/download-artifact@v4
if: needs.test.result == 'success' || needs.test.result == 'failure' ||
needs.e2e.result == 'success' || needs.e2e.result == 'failure'
with:
path: test-results/
- name: Merge JUnit Report XMLs
if: needs.test.result == 'success' || needs.test.result == 'failure' ||
needs.e2e.result == 'success' || needs.e2e.result == 'failure'
run: |
YARN_REGISTRY=
yarn global add junit-report-merger
reports=$(find test-results/ -name \*.xml -type f -exec basename \{\} \; | sort | uniq)
mkdir -p reports/
echo "$reports" | (while read name ; do
yarn exec -s jrm reports/${name} "test-results/**/${name}"
done)
- name: Test Report
uses: dorny/test-reporter@v1
if: needs.test.result == 'success' || needs.test.result == 'failure' ||
needs.e2e.result == 'success' || needs.e2e.result == 'failure'
id: testReport
continue-on-error: true
with:
name: 'Tests Results'
path: reports/*.xml
reporter: jest-junit
- name: Check last job status
id: lastJobStatus
if: always()
run: |
WORKFLOW_STATUS="success"
if [[ "${{ needs.init.result }}" == "failure" ]] ; then
WORKFLOW_STATUS="failure"
elif [[ "${{ needs.calc_matrix.result }}" == "failure" ]] ; then
WORKFLOW_STATUS="failure"
elif [ "${{ needs.test.result }}" == "failure" ] ; then
WORKFLOW_STATUS="failure"
elif [ "${{ needs.e2e.result }}" == "failure" ] ; then
WORKFLOW_STATUS="failure"
elif [ "${{ needs.format_lint_build.result }}" == "failure" ] ; then
WORKFLOW_STATUS="failure"
elif [ "${{ needs.docs.result }}" == "failure" ] ; then
WORKFLOW_STATUS="failure"
# Uncomment to add package tests back in
# elif [ "${{ needs.fw_pkg_test.result }}" == "failure" ] ; then
# WORKFLOW_STATUS="failure"
elif [ "${{ needs.sonar_community.result }}" == "failure" ] ; then
WORKFLOW_STATUS="failure"
elif [ "${{ needs.sonar_enterprise.result }}" == "failure" ] ; then
WORKFLOW_STATUS="failure"
fi
echo "workflowStatus=${WORKFLOW_STATUS}" >> $GITHUB_OUTPUT
LAST_WORKFLOW_STATUS=$(gh run list --workflow .github/workflows/ci.yml -b latest | grep -oh "completed.*" | grep -v "cancelled" | head -1 | awk '{print $2}')
if [ "$GITHUB_RUN_ATTEMPT" -ge 2 ]; then
# Handle re-run cases - there is no way to query the previous run status, so we assume the most
# common scenario will be re-run after failure.
LAST_WORKFLOW_STATUS="failure"
fi
if [ "$LAST_WORKFLOW_STATUS" != "$WORKFLOW_STATUS" ]; then
echo "status changed from $LAST_WORKFLOW_STATUS to $WORKFLOW_STATUS"
echo "changedState=true" >> $GITHUB_OUTPUT
else
echo "status is still $WORKFLOW_STATUS"
echo "changedState=false" >> $GITHUB_OUTPUT
fi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Commit History
id: commits
if: always() && job.status != 'cancelled' && github.ref == 'refs/heads/latest' && steps.lastJobStatus.outputs.changedState == 'true'
run: |
GIT_LOG=$(git log HEAD ^${{ needs.init.outputs.nx_base }} --format="%an (%h) %s")
echo "GIT_LOG<<EOF" >> $GITHUB_ENV
echo "$GIT_LOG" >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
- name: Tag Latest Successful Commit
if: success() && github.ref == 'refs/heads/latest' && steps.lastJobStatus.outputs.workflowStatus != 'failure'
uses: EndBug/latest-tag@latest
with:
ref: latest-success
description: Latest commit to pass GitHub Actions workflow on latest branch.
- name: Find matching workflow
if: always() && job.status != 'cancelled' && github.ref == 'refs/heads/latest'
id: find_latest_sha
uses: SamhammerAG/last-successful-build-action@v4
with:
branch: "latest"
workflow: "ci"
verify: false
- name: SlackBot
if: always() && job.status != 'cancelled' && github.ref == 'refs/heads/latest'
env:
CI_GRID_GATE_CHANNEL: ${{ env.SLACK_CHANNEL }}
CHARTS_TEAM_CITY_CHANNEL: ${{ secrets.CHARTS_TEAM_CITY_CHANNEL }}
WEBSITE_STATUS_CHANNEL: ${{ secrets.WEBSITE_STATUS_CHANNEL }}
SLACK_BOT_OAUTH_TOKEN: ${{ secrets.SLACK_BOT_OAUTH_TOKEN }}
SLACK_DEBUG_CHANNEL: ${{ secrets.SLACK_DEBUG_CHANNEL }}
SLACK_GITHUB_MAPPING: ${{ secrets.SLACK_GITHUB_MAPPING }}
RUN_CONTEXT: >
{
"workflow": "${{ github.workflow }}",
"ref": "${{ github.ref }}",
"currentSha": "${{ github.sha }}",
"lastSuccessfulSha": "${{ steps.find_latest_sha.outputs.sha }}",
"runId": "${{ github.run_id }}",
"project": "AgGrid",
"reportUrl": "${{ steps.testReport.outputs.url_html }}",
"deployToStaging": ${{ needs.docs.outputs.docs_deployed == 'success' }},
"changedState": ${{ steps.lastJobStatus.outputs.changedState == 'true' }},
"jobStatuses":
{
"Format": "${{ needs.format_lint_build.outputs.format }}",
"Lint": "${{ needs.format_lint_build.outputs.lint }}",
"Build": "${{ needs.format_lint_build.outputs.build }}",
"Test": "${{ needs.test.result }}",
"e2e": "${{ needs.e2e.result }}",
"FW_Pkg": "${{ needs.fw_pkg_test.result }}",
"Docs": "${{ needs.docs.result }}",
"SonarCommunity": "${{ needs.sonar_community.result }}",
"SonarEnterprise": "${{ needs.sonar_enterprise.result }}"
}
}
run: |
npx ts-node ./scripts/agBotSlackMessage.ts --auth-token "$SLACK_BOT_OAUTH_TOKEN" \
--grid-channel "$CI_GRID_GATE_CHANNEL" \
--charts-channel "$CHARTS_TEAM_CITY_CHANNEL" \
--website-status-channel "$WEBSITE_STATUS_CHANNEL" \
--debug-channel "$SLACK_DEBUG_CHANNEL" \
--run-context "$RUN_CONTEXT"
- name: Fail job if workflow failed
if: success() && steps.lastJobStatus.outputs.workflowStatus == 'failure'
run: |
echo "Workflow failed, failing the build."
exit 1
sonar_community:
name: SonarQube Community
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- name: SonarQube Analysis Community
uses: SonarSource/sonarqube-scan-action@v5.2.0
env:
SONAR_HOST_URL: https://sonarcloud.io
SONAR_TOKEN: ${{ secrets.SONAR_COMMUNITY_LOGIN }}
with:
projectBaseDir: ./packages/
args: >
-Dsonar.javascript.node.maxspace=8192
-Dsonar.organization=ag-grid
-Dsonar.sources=./ag-grid-community,./ag-grid-angular/projects/ag-grid-angular,./ag-grid-react,./ag-grid-vue3
-Dsonar.typescript.tsconfigPaths=./ag-grid-community/tsconfig.lib.json,./ag-grid-angular/projects/ag-grid-angular/tsconfig.lib.prod.json,./ag-grid-react/tsconfig.json,./ag-grid-vue3/tsconfig.json
-Dsonar.projectKey=ag-grid_community_latest
-Dsonar.exclusions=**/__tests__/*,**/test.ts,**/tsconfig.typings.json,**/LICENSE.html,**/*.md,**/dist,**/node_modules,**/typings,**/lib,**/*spec.js,**/e2e
-Dsonar.scanner.force-deprecated-java-version=true
-Dsonar.coverage.exclusions=**/*
sonar_enterprise:
name: SonarQube Enterprise
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- name: SonarQube Analysis Enterprise
uses: SonarSource/sonarqube-scan-action@v5.2.0
env:
SONAR_TOKEN: ${{ secrets.SONAR_ENTERPRISE_LOGIN }}
SONAR_HOST_URL: https://sonarcloud.io
with:
projectBaseDir: ./packages/
args: >
-Dsonar.javascript.node.maxspace=8192
-Dsonar.organization=ag-grid
-Dsonar.sources=./ag-grid-enterprise
-Dsonar.typescript.tsconfigPaths=./ag-grid-enterprise/tsconfig.lib.json
-Dsonar.branch.name=master
-Dsonar.projectKey=ag-grid-enterprise-latest
-Dsonar.exclusions=**/tsconfig.typings.json,**/LICENSE.html,**/*.md,**/dist,**/node_modules,**/typings,**/lib,**/*spec.js,**/e2e
-Dsonar.scanner.force-deprecated-java-version=true
-Dsonar.coverage.exclusions=**/*