Procházet zdrojové kódy

ci: rebalance paid runner gates

Tianyi Cui před 1 měsícem
rodič
revize
f38ae74b95
2 změnil soubory, kde provedl 13 přidání a 20 odebrání
  1. 12 13
      .github/workflows/ci.yml
  2. 1 7
      scripts/run-gates.ts

+ 12 - 13
.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: >-

+ 1 - 7
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',