[ci] Separate DevTools test-build into dedicated job with fewer shards (#35457)
DevTools has ~45 test files which don't distribute well across 10 shards, causing shard 3 to run 2x slower than others (104s vs ~50s). This moves DevTools build tests to a separate job with 3 shards for better load balancing.
lauren committed
Jan 6, 2026 at 17:23 UTC
0e180141bf9b859efdbe067cf1eb850e22048bf8
1 file changed
+42
-3
.github/workflows/runtime_build_and_test.yml
+42
-3
@@ -382,9 +382,6 @@ jobs:
382
-r=experimental --env=development,
383
-r=experimental --env=production,
384
385
- # Dev Tools
386
- --project=devtools -r=experimental,
387
-
385
# TODO: Update test config to support www build tests
386
# - "-r=www-classic --env=development --variant=false"
387
# - "-r=www-classic --env=production --variant=false"
@@ -450,6 +447,48 @@ jobs:
447
run: ls -R build
448
- run: yarn test --build ${{ matrix.test_params }} --shard=${{ matrix.shard }} --ci
449
450
+ test_build_devtools:
451
+ name: yarn test-build (devtools)
452
+ needs: [build_and_lint, runtime_node_modules_cache]
453
+ strategy:
454
+ fail-fast: false
455
+ matrix:
456
+ shard:
457
+ - 1/3
458
+ - 2/3
459
+ - 3/3
460
+ runs-on: ubuntu-latest
461
+ steps:
462
+ - uses: actions/checkout@v4
463
+ with:
464
+ ref: ${{ github.event.inputs.commit_sha != '' && github.event.inputs.commit_sha || github.event.pull_request.head.sha || github.sha }}
465
+ - uses: actions/setup-node@v4
466
+ with:
467
+ node-version-file: '.nvmrc'
468
+ cache: yarn
469
+ cache-dependency-path: yarn.lock
470
+ - name: Restore cached node_modules
471
+ uses: actions/cache/restore@v4
472
+ id: node_modules
473
+ with:
474
+ path: |
475
+ **/node_modules
476
+ key: runtime-node_modules-v7-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
477
+ # Don't use restore-keys here. Otherwise the cache grows indefinitely.
478
+ - name: Ensure clean build directory
479
+ run: rm -rf build
480
+ - run: yarn install --frozen-lockfile
481
+ if: steps.node_modules.outputs.cache-hit != 'true'
482
+ - name: Restore archived build
483
+ uses: actions/download-artifact@v4
484
+ with:
485
+ pattern: _build_*
486
+ path: build
487
+ merge-multiple: true
488
+ - name: Display structure of build
489
+ run: ls -R build
490
+ - run: yarn test --build --project=devtools -r=experimental --shard=${{ matrix.shard }} --ci
491
+
492
process_artifacts_combined:
493
name: Process artifacts combined
494
needs: [build_and_lint, runtime_node_modules_cache]