|
1 | 1 | name: CI |
2 | | -on: [push, pull_request] |
| 2 | +on: |
| 3 | + push: |
| 4 | + branches: [master] |
| 5 | + pull_request: |
3 | 6 | defaults: |
4 | 7 | run: |
5 | 8 | working-directory: ./packages/toolkit |
@@ -70,18 +73,15 @@ jobs: |
70 | 73 | matrix: |
71 | 74 | node: ['24.x'] |
72 | 75 | react: |
73 | | - [ |
74 | | - { |
75 | | - version: '^18', |
76 | | - types: ^18, |
77 | | - react-dom: { version: '^18', types: '^18' }, |
78 | | - }, |
79 | | - { |
80 | | - version: '^19', |
81 | | - types: '^19', |
82 | | - react-dom: { version: '^19', types: '^19' }, |
83 | | - }, |
84 | | - ] |
| 76 | + # Define anchors for reuse throughout the file |
| 77 | + - &react18 |
| 78 | + version: '^18' |
| 79 | + types: '^18' |
| 80 | + react-dom: { version: '^18', types: '^18' } |
| 81 | + - &react19 |
| 82 | + version: '^19' |
| 83 | + types: '^19' |
| 84 | + react-dom: { version: '^19', types: '^19' } |
85 | 85 |
|
86 | 86 | steps: |
87 | 87 | - name: Checkout repo |
@@ -138,20 +138,20 @@ jobs: |
138 | 138 | fail-fast: false |
139 | 139 | matrix: |
140 | 140 | node: ['24.x'] |
141 | | - ts: ['5.4', '5.5', '5.6', '5.7', '5.8', '5.9', 'next'] |
142 | | - react: |
143 | | - [ |
144 | | - { |
145 | | - version: '^18', |
146 | | - types: ^18, |
147 | | - react-dom: { version: '^18', types: '^18' }, |
148 | | - }, |
149 | | - { |
150 | | - version: '^19', |
151 | | - types: '^19', |
152 | | - react-dom: { version: '^19', types: '^19' }, |
153 | | - }, |
154 | | - ] |
| 141 | + # Sparse matrix: All TS versions with React 19, boundary TS versions with React 18 |
| 142 | + include: |
| 143 | + # React 19 × all TS versions |
| 144 | + - { ts: '5.4', react: *react19 } |
| 145 | + - { ts: '5.5', react: *react19 } |
| 146 | + - { ts: '5.6', react: *react19 } |
| 147 | + - { ts: '5.7', react: *react19 } |
| 148 | + - { ts: '5.8', react: *react19 } |
| 149 | + - { ts: '5.9', react: *react19 } |
| 150 | + - { ts: 'next', react: *react19 } |
| 151 | + # React 18 × boundary TS versions only (5.4, 5.8, next) |
| 152 | + - { ts: '5.4', react: *react18 } |
| 153 | + - { ts: '5.8', react: *react18 } |
| 154 | + - { ts: 'next', react: *react18 } |
155 | 155 |
|
156 | 156 | steps: |
157 | 157 | - name: Checkout repo |
@@ -314,13 +314,37 @@ jobs: |
314 | 314 | fail-fast: false |
315 | 315 | matrix: |
316 | 316 | node: ['24.x'] |
317 | | - ts: ['5.4', '5.5', '5.6', '5.7', '5.8', '5.9', 'next'] |
318 | | - example: |
319 | | - [ |
320 | | - { name: 'bundler', moduleResolution: 'Bundler' }, |
321 | | - { name: 'nodenext-cjs', moduleResolution: 'NodeNext' }, |
322 | | - { name: 'nodenext-esm', moduleResolution: 'NodeNext' }, |
323 | | - ] |
| 317 | + # Sparse matrix: All TS versions with bundler, boundary TS versions with nodenext |
| 318 | + include: |
| 319 | + # bundler × all TS versions |
| 320 | + - ts: '5.4' |
| 321 | + example: { name: 'bundler', moduleResolution: 'Bundler' } |
| 322 | + - ts: '5.5' |
| 323 | + example: { name: 'bundler', moduleResolution: 'Bundler' } |
| 324 | + - ts: '5.6' |
| 325 | + example: { name: 'bundler', moduleResolution: 'Bundler' } |
| 326 | + - ts: '5.7' |
| 327 | + example: { name: 'bundler', moduleResolution: 'Bundler' } |
| 328 | + - ts: '5.8' |
| 329 | + example: { name: 'bundler', moduleResolution: 'Bundler' } |
| 330 | + - ts: '5.9' |
| 331 | + example: { name: 'bundler', moduleResolution: 'Bundler' } |
| 332 | + - ts: 'next' |
| 333 | + example: { name: 'bundler', moduleResolution: 'Bundler' } |
| 334 | + # nodenext-cjs × boundary TS versions only (5.4, 5.8, next) |
| 335 | + - ts: '5.4' |
| 336 | + example: { name: 'nodenext-cjs', moduleResolution: 'NodeNext' } |
| 337 | + - ts: '5.8' |
| 338 | + example: { name: 'nodenext-cjs', moduleResolution: 'NodeNext' } |
| 339 | + - ts: 'next' |
| 340 | + example: { name: 'nodenext-cjs', moduleResolution: 'NodeNext' } |
| 341 | + # nodenext-esm × boundary TS versions only (5.4, 5.8, next) |
| 342 | + - ts: '5.4' |
| 343 | + example: { name: 'nodenext-esm', moduleResolution: 'NodeNext' } |
| 344 | + - ts: '5.8' |
| 345 | + example: { name: 'nodenext-esm', moduleResolution: 'NodeNext' } |
| 346 | + - ts: 'next' |
| 347 | + example: { name: 'nodenext-esm', moduleResolution: 'NodeNext' } |
324 | 348 | steps: |
325 | 349 | - name: Checkout repo |
326 | 350 | uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5 |
|
0 commit comments