|
|
@@ -28,29 +28,29 @@ env:
|
|
|
jobs:
|
|
|
|
|
|
# Two enterprise runners split the two longest primary Node paths. The
|
|
|
- # static lane produces the built tree before artifact validation, while the
|
|
|
- # independent coverage and snapshot paths overlap on the other runner.
|
|
|
+ # static lane starts snapshot and artifact validation as soon as its build
|
|
|
+ # completes, while exhaustive coverage runs alone on the other runner.
|
|
|
node-24:
|
|
|
if: github.event_name == 'pull_request'
|
|
|
runs-on: ${{ matrix.runner }}
|
|
|
name: ${{ matrix.name }}
|
|
|
env:
|
|
|
- DSH_COVERAGE_MAX_WORKERS: '8'
|
|
|
+ DSH_COVERAGE_MAX_WORKERS: '16'
|
|
|
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: '8'
|
|
|
+ DSH_SNAPSHOT_MAX_CONCURRENCY: '16'
|
|
|
strategy:
|
|
|
fail-fast: false
|
|
|
matrix:
|
|
|
include:
|
|
|
- - lane: static-artifacts
|
|
|
- name: node 24 / static and artifacts
|
|
|
+ - lane: static-snapshots-artifacts
|
|
|
+ name: node 24 / static, snapshots, and artifacts
|
|
|
runner: dsh-enterprise-ubuntu-latest-32core-test
|
|
|
- - lane: coverage-snapshots
|
|
|
- name: node 24 / coverage and snapshots
|
|
|
+ - lane: coverage
|
|
|
+ name: node 24 / coverage
|
|
|
runner: dsh-enterprise-ubuntu-24-04-32core-test
|
|
|
steps:
|
|
|
- uses: actions/checkout@v6
|
|
|
@@ -66,14 +66,6 @@ jobs:
|
|
|
restore-keys: |
|
|
|
${{ runner.os }}-node-${{ env.PRIMARY_NODE_VERSION }}-pnpm-
|
|
|
|
|
|
- - uses: actions/cache/restore@v4
|
|
|
- if: matrix.lane == 'static-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 }}
|
|
|
@@ -92,42 +84,67 @@ jobs:
|
|
|
if (( install_status != 0 )); then exit "$install_status"; fi
|
|
|
exit "$sandbox_status"
|
|
|
|
|
|
- - name: Run static, lint, and Node 24 compatibility gates concurrently
|
|
|
- if: matrix.lane == 'static-artifacts'
|
|
|
+ - name: Run static, compatibility, snapshot, and artifact gates
|
|
|
+ if: matrix.lane == 'static-snapshots-artifacts'
|
|
|
run: |
|
|
|
- static_status=0
|
|
|
- lint_status=0
|
|
|
- compat_status=0
|
|
|
- pnpm run check:ci:static &
|
|
|
+ static_log="$RUNNER_TEMP/static-gates.log"
|
|
|
+ : > "$static_log"
|
|
|
+ pnpm run check:ci:static > >(tee "$static_log") 2>&1 &
|
|
|
static_pid=$!
|
|
|
pnpm run check:ci:lint &
|
|
|
lint_pid=$!
|
|
|
pnpm run check:node-compat &
|
|
|
compat_pid=$!
|
|
|
- wait "$static_pid" || static_status=$?
|
|
|
- wait "$lint_pid" || lint_status=$?
|
|
|
- wait "$compat_pid" || compat_status=$?
|
|
|
- if (( static_status != 0 )); then exit "$static_status"; fi
|
|
|
- if (( lint_status != 0 )); then exit "$lint_status"; fi
|
|
|
- exit "$compat_status"
|
|
|
-
|
|
|
- - name: Validate built artifacts
|
|
|
- if: matrix.lane == 'static-artifacts'
|
|
|
- run: pnpm run check:ci:artifacts
|
|
|
-
|
|
|
- - name: Run coverage and build-backed snapshots concurrently
|
|
|
- if: matrix.lane == 'coverage-snapshots'
|
|
|
- run: |
|
|
|
- coverage_status=0
|
|
|
- snapshot_status=0
|
|
|
- pnpm run check:ci:coverage &
|
|
|
- coverage_pid=$!
|
|
|
- pnpm run check:ci:snapshot &
|
|
|
+
|
|
|
+ until grep -Fq 'run-gates: PASS build ' "$static_log"; do
|
|
|
+ if ! kill -0 "$static_pid" 2>/dev/null; then
|
|
|
+ static_status=0
|
|
|
+ wait "$static_pid" || static_status=$?
|
|
|
+ if grep -Fq 'run-gates: PASS build ' "$static_log"; then break; fi
|
|
|
+ if (( static_status != 0 )); then exit "$static_status"; fi
|
|
|
+ echo '::error::Static gates exited without completing the build.'
|
|
|
+ exit 1
|
|
|
+ fi
|
|
|
+ sleep 0.2
|
|
|
+ done
|
|
|
+
|
|
|
+ DSH_EXAMPLE_MODE=lib pnpm run test:snapshot &
|
|
|
snapshot_pid=$!
|
|
|
- wait "$coverage_pid" || coverage_status=$?
|
|
|
- wait "$snapshot_pid" || snapshot_status=$?
|
|
|
- if (( coverage_status != 0 )); then exit "$coverage_status"; fi
|
|
|
- exit "$snapshot_status"
|
|
|
+ pnpm run publint &
|
|
|
+ publint_pid=$!
|
|
|
+ pnpm run verify-node-next-types &
|
|
|
+ node_next_pid=$!
|
|
|
+ pnpm run verify-built-package-invariants &
|
|
|
+ built_invariants_pid=$!
|
|
|
+ DSH_EXAMPLE_MODE=lib pnpm exec vitest run --config vitest.e2e.config.ts \
|
|
|
+ examples/headless-agent/tests/keyless-smoke.e2e.ts \
|
|
|
+ examples/tui-agent/tests/tui-keyless-smoke.e2e.ts \
|
|
|
+ packages/examples/cli-demo/tests/built-bin.e2e.ts \
|
|
|
+ packages/examples/acp-demo/tests/built-bin.e2e.ts \
|
|
|
+ packages/ui/jsonrpc/tests/built-scope-carrier.e2e.ts \
|
|
|
+ packages/workflow/workflow-workerthread/tests/built-worker.e2e.ts \
|
|
|
+ packages/code-runtime/code-runtime-worker/tests/built-lib.e2e.ts &
|
|
|
+ built_bin_pid=$!
|
|
|
+
|
|
|
+ final_status=0
|
|
|
+ capture_status() {
|
|
|
+ local child_status=0
|
|
|
+ wait "$1" || child_status=$?
|
|
|
+ if (( final_status == 0 && child_status != 0 )); then
|
|
|
+ final_status=$child_status
|
|
|
+ fi
|
|
|
+ }
|
|
|
+ for child_pid in \
|
|
|
+ "$static_pid" "$lint_pid" "$compat_pid" "$snapshot_pid" \
|
|
|
+ "$publint_pid" "$node_next_pid" "$built_invariants_pid" "$built_bin_pid"
|
|
|
+ do
|
|
|
+ capture_status "$child_pid"
|
|
|
+ done
|
|
|
+ exit "$final_status"
|
|
|
+
|
|
|
+ - name: Run exhaustive coverage
|
|
|
+ if: matrix.lane == 'coverage'
|
|
|
+ run: pnpm run check:ci:coverage
|
|
|
|
|
|
|
|
|
node-compat:
|
|
|
@@ -204,6 +221,7 @@ jobs:
|
|
|
env:
|
|
|
DSH_COVERAGE_MAX_WORKERS: '12'
|
|
|
DSH_ESLINT_CACHE: '1'
|
|
|
+ DSH_ESLINT_CONCURRENCY: '32'
|
|
|
DSH_GATE_CONCURRENCY: '16'
|
|
|
DSH_PUBLINT_CONCURRENCY: '16'
|
|
|
steps:
|