From f38ae74b958bc34bbc3d84ca4ec87dc2950e06ef Mon Sep 17 00:00:00 2001 From: Tianyi Cui <53024+tianyicui@users.noreply.github.com> Date: Thu, 23 Jul 2026 16:13:33 +0800 Subject: [PATCH] ci: rebalance paid runner gates --- .github/workflows/ci.yml | 25 ++++++++++++------------- scripts/run-gates.ts | 8 +------- 2 files changed, 13 insertions(+), 20 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4f5aa613b3..8c3f3be59a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -35,13 +35,13 @@ jobs: runs-on: ${{ matrix.runner }} name: ${{ matrix.name }} env: - DSH_COVERAGE_MAX_WORKERS: '16' + DSH_COVERAGE_MAX_WORKERS: '24' DSH_ESLINT_CACHE: '1' DSH_ESLINT_CONCURRENCY: '8' DSH_GATE_CONCURRENCY: '8' DSH_NODE_COMPAT_SKIP_TYPECHECK: '1' DSH_PUBLINT_CONCURRENCY: '8' - DSH_SNAPSHOT_MAX_CONCURRENCY: '16' + DSH_SNAPSHOT_MAX_CONCURRENCY: '32' strategy: fail-fast: false matrix: @@ -66,6 +66,14 @@ jobs: restore-keys: | ${{ runner.os }}-node-${{ env.PRIMARY_NODE_VERSION }}-pnpm- + - uses: actions/cache/restore@v4 + if: matrix.lane == 'static-snapshots-artifacts' + with: + path: .cache/eslint + key: ${{ runner.os }}-node-${{ env.PRIMARY_NODE_VERSION }}-eslint-full-${{ hashFiles('pnpm-lock.yaml', 'eslint.config.mjs', 'tsconfig.json', 'tsconfig.base.json', 'tsconfig.base.client.json', 'tsconfig.host.json', 'tsconfig.client.json', 'packages/*/*/tsconfig.json', 'examples/*/tsconfig.json') }} + restore-keys: | + ${{ runner.os }}-node-${{ env.PRIMARY_NODE_VERSION }}-eslint-full- + - uses: actions/setup-node@v6 with: node-version: ${{ env.PRIMARY_NODE_VERSION }} @@ -212,28 +220,19 @@ jobs: run: uv run --python 3.10 --group test --project python/sdk pytest # One Windows box shares setup across the required build/site checks and the - # complete observational portability inventory. run-gates reports failures - # from observational gates without allowing them to fail the required job. + # observational portability inventory. Linux owns duplicate lint, coverage, + # and snapshots so they do not dominate the paid Windows critical path. windows: if: github.event_name == 'pull_request' runs-on: dsh-enterprise-windows-2025-32core-test name: windows node 24 / complete env: DSH_COVERAGE_MAX_WORKERS: '12' - DSH_ESLINT_CACHE: '1' - DSH_ESLINT_CONCURRENCY: '32' DSH_GATE_CONCURRENCY: '16' DSH_PUBLINT_CONCURRENCY: '16' steps: - uses: actions/checkout@v6 - - uses: actions/cache/restore@v4 - with: - path: .cache/eslint - key: ${{ runner.os }}-node-${{ env.PRIMARY_NODE_VERSION }}-eslint-full-${{ hashFiles('pnpm-lock.yaml', 'eslint.config.mjs', 'tsconfig.json', 'tsconfig.base.json', 'tsconfig.base.client.json', 'tsconfig.host.json', 'tsconfig.client.json', 'packages/*/*/tsconfig.json', 'examples/*/tsconfig.json') }} - restore-keys: | - ${{ runner.os }}-node-${{ env.PRIMARY_NODE_VERSION }}-eslint-full- - - name: Enable Developer Mode (symlink support) shell: pwsh run: >- diff --git a/scripts/run-gates.ts b/scripts/run-gates.ts index 896ffacfd1..2f0bd164c9 100644 --- a/scripts/run-gates.ts +++ b/scripts/run-gates.ts @@ -317,14 +317,8 @@ function ciWindowsCompleteGates(): Gate[] { function ciWindowsObservationalGates(): Gate[] { return [ ...ciStaticGates(), - lintGate(), + // Linux owns required lint, coverage, and snapshots; Windows omits those duplicates. pnpmScript('duplication', 'duplication'), - { - ...coverageGate(), - env: { DSH_EXAMPLE_MODE: 'lib' }, - needs: ['build'], - }, - snapshotGate(), pnpmScript('publint', 'publint', { needs: ['build'] }), pnpmScript('node-next-types', 'verify-node-next-types', { label: 'node-next types',