ci: shadow typecheck/unit/integration jobs on Blacksmith#1744
ci: shadow typecheck/unit/integration jobs on Blacksmith#1744
Conversation
Gated behind repo variable BLACKSMITH_SHADOW_ENABLED so shadow runs can be toggled without a code change. Pairs ubuntu-latest with blacksmith-4vcpu-ubuntu-2404 and macos-latest with blacksmith-6vcpu-macos-latest. Shadow entries are continue-on-error so Blacksmith failures don't block PRs, cache keys are scoped to matrix.runner to avoid cross-runner cache poisoning, and the Playwright report only uploads from the macos-latest primary. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Reviews (1): Last reviewed commit: "ci: shadow typecheck/unit/integration jo..." | Re-trigger Greptile |
There was a problem hiding this comment.
Pull request overview
Adds “shadow” CI executions so typecheck/unit/integration jobs can run in parallel on GitHub-hosted vs Blacksmith runners (optionally enabled via BLACKSMITH_SHADOW_ENABLED) to compare performance and reliability without blocking PRs.
Changes:
- Introduces a
runnermatrix fortypecheck,unit-test, andintegration-test, gated byvars.BLACKSMITH_SHADOW_ENABLED. - Marks Blacksmith matrix entries as
continue-on-errorand disablesfail-fastfor the matrix. - Scopes Playwright/Electron cache keys to
matrix.runnerand restricts Playwright report uploads to the primary macOS runner.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| .github/workflows/typecheck.yml | Adds runner matrix + shadow execution for typecheck on Blacksmith. |
| .github/workflows/test.yml | Adds runner matrices for unit/integration; adjusts caching and Playwright artifact upload behavior for shadows. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
actions/setup-node's built-in pnpm cache keys on runner.os, so ubuntu-latest and blacksmith-4vcpu-ubuntu-2404 (and the macOS pair) would share a cache entry and contaminate the shadow comparison. Replace with an explicit actions/cache keyed by matrix.runner, matching the Playwright/Electron cache pattern in test.yml. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| runner: ${{ fromJSON(vars.BLACKSMITH_SHADOW_ENABLED == 'true' && '["macos-latest","blacksmith-6vcpu-macos-latest"]' || '["macos-latest"]') }} | ||
| runs-on: ${{ matrix.runner }} | ||
| continue-on-error: ${{ matrix.runner != 'macos-latest' }} |
There was a problem hiding this comment.
Same as for unit-test: without an explicit job name, the matrix-expanded check will typically show up as integration-test (runner: …), not integration-test (macos-latest). Consider adding a name that includes matrix.runner so required check names are clear and match the PR’s guidance.
|
@copilot why are the 3 pending checks not reporting? |
Agent-Logs-Url: https://github.com/PostHog/code/sessions/2ea01766-809c-4b16-87dd-8efec52191c5 Co-authored-by: gantoine <3247106+gantoine@users.noreply.github.com>
The root cause is that GitHub's matrix strategy automatically appends Fixed in 760791c by adding an explicit name: ${{ matrix.runner == 'ubuntu-latest' && 'typecheck' || format('typecheck ({0})', matrix.runner) }}This keeps required check names stable whether shadow is on or off, and gives shadow entries a distinct name so they don't conflict. |
Summary
runnermatrix dimension totypecheck,unit-test, andintegration-testso each job can run head-to-head on GitHub-hosted and Blacksmith runners for apples-to-apples comparison data. Inspired by PostHog/posthog#54559.BLACKSMITH_SHADOW_ENABLEDso shadows can be toggled without a code change. Pairsubuntu-latest↔blacksmith-4vcpu-ubuntu-2404andmacos-latest↔blacksmith-6vcpu-macos-latest.continue-on-error: trueso Blacksmith failures don't block PRs. Cache keys are scoped tomatrix.runnerto avoid cross-runner poisoning, and the Playwright report only uploads from themacos-latestprimary.Before this is useful
BLACKSMITH_SHADOW_ENABLED=truein Settings → Variables → Actions.typecheck→typecheck (ubuntu-latest)), and Blacksmith entries should be excluded from required checks.Test plan
BLACKSMITH_SHADOW_ENABLEDunset and confirm this PR's CI still runs exactly one entry per job (original behavior).macos-latest).🤖 Generated with Claude Code