99 branches :
1010 - main
1111 - release-*
12+ merge_group :
13+ branches :
14+ - main
15+ # - release-*
1216
1317permissions :
1418 contents : read
@@ -24,43 +28,107 @@ jobs:
2428 strategy :
2529 fail-fast : false
2630 matrix :
27- os :
28- - ubuntu-latest
29- - windows-latest
30- - macos-latest
31- node-version :
32- - ' 22'
33- - ' 20'
34- - ' 18'
35- - ' 16'
36- - ' 14'
37- bundle :
38- - ' true'
39- include :
40- - node-version : ' lts/*'
31+ config :
32+ # Main builds
33+ - os : ubuntu-latest
34+ node-version : ' 24'
35+ bundle : true
36+
37+ # Other builds (skipped in merge queues)
38+ - os : windows-latest
39+ node-version : ' 24'
40+ bundle : true
41+ skip : ${{ github.event_name == 'merge_group' }}
42+ - os : macos-latest
43+ node-version : ' 24'
44+ bundle : true
45+ skip : ${{ github.event_name == 'merge_group' }}
46+ - os : ubuntu-latest
47+ node-version : ' 22'
48+ bundle : true
49+ - os : windows-latest
50+ node-version : ' 22'
51+ bundle : true
52+ skip : ${{ github.event_name == 'merge_group' }}
53+ # Skip macOS for this version; resources are limited.
54+ # - os: macos-latest
55+ # node-version: '22'
56+ # bundle: true
57+ # skip: ${{ github.event_name == 'merge_group' }}
58+ - os : ubuntu-latest
59+ node-version : ' 20'
60+ bundle : true
61+ - os : windows-latest
62+ node-version : ' 20'
63+ bundle : true
64+ skip : ${{ github.event_name == 'merge_group' }}
65+ # Skip macOS for this version; resources are limited.
66+ # - os: macos-latest
67+ # node-version: '20'
68+ # bundle: true
69+ # skip: ${{ github.event_name == 'merge_group' }}
70+ - os : ubuntu-latest
71+ node-version : ' 18'
72+ bundle : true
73+ - os : windows-latest
74+ node-version : ' 18'
75+ bundle : true
76+ skip : ${{ github.event_name == 'merge_group' }}
77+ # Skip macOS for this version; resources are limited.
78+ # - os: macos-latest
79+ # node-version: '18'
80+ # bundle: true
81+ # skip: ${{ github.event_name == 'merge_group' }}
82+ - os : ubuntu-latest
83+ node-version : ' 16'
84+ bundle : true
85+ - os : windows-latest
86+ node-version : ' 16'
87+ bundle : true
88+ skip : ${{ github.event_name == 'merge_group' }}
89+ - os : macos-latest
90+ node-version : ' 16'
91+ bundle : true
92+ skip : ${{ github.event_name == 'merge_group' }}
93+ - os : ubuntu-latest
94+ node-version : ' 14'
95+ bundle : true
96+ skip : ${{ github.event_name == 'merge_group' }}
97+ - os : windows-latest
98+ node-version : ' 14'
99+ bundle : true
100+ skip : ${{ github.event_name == 'merge_group' }}
101+ # No Node 14 on ARM macOS
102+ # - os: macos-latest
103+ # node-version: '14'
104+ # bundle: true
105+ # skip: ${{ github.event_name == 'merge_group' }}
106+
107+ - os : ubuntu-latest
108+ node-version : ' lts/*'
41109 bundle : false
42- os : ubuntu-latest
110+ skip : ${{ github.event_name == 'merge_group' }}
111+
43112 exclude :
44- # No Node 14 on ARM macOS
45- - node-version : ' 14'
46- os : macos-latest
113+ - config :
114+ skip : true
47115
48- runs-on : ${{ matrix.os }}
49- name : Test Node ${{ matrix.node-version }} on ${{ matrix.os }}${{ (!matrix.bundle && ' with --no-bundle') || '' }}
116+ runs-on : ${{ matrix.config. os }}
117+ name : Test Node ${{ matrix.config. node-version }} on ${{ matrix.config. os }}${{ (!matrix.config .bundle && ' with --no-bundle') || '' }}
50118
51119 steps :
52- - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
53- - name : Use node version ${{ matrix.node-version }}
120+ - uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
121+ - name : Use node version ${{ matrix.config. node-version }}
54122 uses : actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
55123 with :
56- node-version : ${{ matrix.node-version }}
124+ node-version : ${{ matrix.config. node-version }}
57125 check-latest : true
58126 - run : npm ci
59127
60128 - name : Tests
61129 id : test
62130 # run tests, but lint separately
63- run : npm run test -- --no-lint --bundle=${{ matrix.bundle }}
131+ run : npm run test -- --no-lint --bundle=${{ matrix.config. bundle }}
64132
65133 - name : Print baseline diff on failure
66134 if : ${{ failure() && steps.test.conclusion == 'failure' }}
70138 git diff --staged --exit-code
71139
72140 coverage :
141+ if : ${{ github.event_name != 'merge_group' }}
142+
73143 runs-on :
74144 - ' self-hosted'
75145 - ' 1ES.Pool=TypeScript-1ES-GitHub-Large'
80150 contents : read
81151
82152 steps :
83- - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
153+ - uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
84154 - uses : actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
85155 with :
86156 node-version : ' lts/*'
@@ -105,7 +175,7 @@ jobs:
105175 runs-on : ubuntu-latest
106176
107177 steps :
108- - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
178+ - uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
109179 - uses : actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
110180 with :
111181 node-version : ' lts/*'
@@ -118,7 +188,7 @@ jobs:
118188 runs-on : ubuntu-latest
119189
120190 steps :
121- - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
191+ - uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
122192 - uses : actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
123193 with :
124194 node-version : ' lts/*'
@@ -131,13 +201,13 @@ jobs:
131201 runs-on : ubuntu-latest
132202
133203 steps :
134- - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
204+ - uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
135205 - uses : actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
136206 with :
137207 node-version : ' lts/*'
138208 - run : npm ci
139209
140- - uses : actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
210+ - uses : actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
141211 with :
142212 path : ~/.cache/dprint
143213 key : ${{ runner.os }}-dprint-${{ hashFiles('package-lock.json', '.dprint.jsonc') }}
@@ -151,7 +221,7 @@ jobs:
151221 runs-on : ubuntu-latest
152222
153223 steps :
154- - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
224+ - uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
155225 - uses : actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
156226 with :
157227 node-version : ' lts/*'
@@ -167,7 +237,7 @@ jobs:
167237 runs-on : ubuntu-latest
168238
169239 steps :
170- - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
240+ - uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
171241 - uses : actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
172242 with :
173243 node-version : ' lts/*'
@@ -180,7 +250,7 @@ jobs:
180250 runs-on : ubuntu-latest
181251
182252 steps :
183- - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
253+ - uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
184254
185255 - uses : actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
186256 with :
@@ -221,11 +291,11 @@ jobs:
221291 if : github.event_name == 'pull_request'
222292
223293 steps :
224- - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
294+ - uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
225295 with :
226296 path : pr
227297
228- - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
298+ - uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
229299 with :
230300 path : base
231301 ref : ${{ github.base_ref }}
@@ -262,7 +332,7 @@ jobs:
262332 runs-on : ubuntu-latest
263333
264334 steps :
265- - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
335+ - uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
266336 - uses : actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
267337 with :
268338 node-version : ' lts/*'
@@ -278,7 +348,7 @@ jobs:
278348 runs-on : ubuntu-latest
279349
280350 steps :
281- - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
351+ - uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
282352 - uses : actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
283353 with :
284354 node-version : ' lts/*'
@@ -294,10 +364,12 @@ jobs:
294364 run : npx hereby build-src --built
295365
296366 baselines :
367+ if : ${{ github.event_name != 'merge_group' }}
368+
297369 runs-on : ubuntu-latest
298370
299371 steps :
300- - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
372+ - uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
301373 - uses : actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
302374 with :
303375 node-version : ' lts/*'
@@ -338,3 +410,27 @@ jobs:
338410 with :
339411 name : fix_baselines.patch
340412 path : fix_baselines.patch
413+
414+ required :
415+ runs-on : ubuntu-latest
416+ if : ${{ always() }}
417+ needs :
418+ - test
419+ - coverage
420+ - lint
421+ - knip
422+ - format
423+ - browser-integration
424+ - typecheck
425+ - smoke
426+ - package-size
427+ - misc
428+ - self-check
429+ - baselines
430+
431+ steps :
432+ - name : Check required jobs
433+ env :
434+ NEEDS : ${{ toJson(needs) }}
435+ run : |
436+ ! echo $NEEDS | jq -e 'to_entries[] | { job: .key, result: .value.result } | select((.result == "success" or .result == "skipped") | not)'
0 commit comments