@devries-cameron20 / t3code-1 / commits / 3697644915
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

ci: run typecheck inside the Build job (#19633)

maria committed Oct 15, 2026 at 23:39 UTC 369764491556dfae6f36054596585b2f2b1dd670
1 file changed +40 -39
.github/workflows/ci.yml
+40 -39
@@ -54,10 +54,10 @@ jobs:
54 id: detect
55 uses: ./.github/actions/ci-changes
56
57 - # Lint, typecheck, and the desktop build each get a runner so they run side by
58 - # side instead of one after another. Lint always runs: it formats every file,
59 - # docs included. The `Check` job at the end of this file passes only when
60 - # every other job passes or was skipped by `changes`.
57 + # Lint and the desktop build each get a runner so they run side by side.
58 + # Typecheck shares the build's install. Lint always runs: it formats every
59 + # file, docs included. The `Check` job at the end of this file passes only
60 + # when every other job passes or was skipped by `changes`.
61 lint:
62 name: Lint
63 runs-on: blacksmith-8vcpu-ubuntu-2404
@@ -99,38 +99,10 @@ jobs:
99 - name: Check
100 run: vp check
101
102 - typecheck:
103 - name: Typecheck
104 - needs: changes
105 - if: ${{ !cancelled() && needs.changes.outputs.typecheck != 'false' }}
106 - runs-on: blacksmith-8vcpu-ubuntu-2404
107 - timeout-minutes: 10
108 - steps:
109 - - name: Checkout
110 - uses: actions/checkout@v6
111 - with:
112 - sparse-checkout: |
113 - /*
114 - !/.repos/
115 - sparse-checkout-cone-mode: false
116 -
117 - - name: Setup Vite+
118 - uses: voidzero-dev/setup-vp@v1
119 - with:
120 - node-version-file: package.json
121 - cache: true
122 - run-install: true
123 -
124 - - name: Ensure Electron runtime is installed
125 - run: vp run --filter @t3tools/desktop ensure:electron
126 -
127 - - name: Typecheck
128 - run: vpr typecheck
129 -
102 build:
131 - name: Build
103 + name: Build and Typecheck
104 needs: changes
133 - if: ${{ !cancelled() && needs.changes.outputs.build != 'false' }}
105 + if: ${{ !cancelled() && (needs.changes.outputs.build != 'false' || needs.changes.outputs.typecheck != 'false') }}
106 runs-on: blacksmith-8vcpu-ubuntu-2404
107 timeout-minutes: 10
108 steps:
@@ -143,9 +115,11 @@ jobs:
115 sparse-checkout-cone-mode: false
116
117 - uses: ./.github/actions/setup-apt-mirrors
118 + if: needs.changes.outputs.build != 'false'
119
120 # Runs in the background while Vite+ installs; the step before the build waits for it.
121 - name: Start installing browser secret helper build libraries
122 + if: needs.changes.outputs.build != 'false'
123 run: |
124 sudo sed -i 's|http://|https://|g' /etc/apt/blacksmith-ubuntu-mirrors.txt /etc/apt/sources.list.d/ubuntu.sources
125 (
@@ -162,9 +136,24 @@ jobs:
136 run-install: true
137
138 - name: Ensure Electron runtime is installed
139 + id: electron
140 run: vp run --filter @t3tools/desktop ensure:electron
141
142 + # Runs in the background while the build runs, and reports in the last
143 + # step: neither result hides the other.
144 + - name: Start typecheck
145 + id: typecheck
146 + if: ${{ !cancelled() && steps.electron.outcome == 'success' && needs.changes.outputs.typecheck != 'false' }}
147 + run: |
148 + (
149 + set +e
150 + vpr typecheck
151 + echo "$?" > "$RUNNER_TEMP/typecheck-status"
152 + ) > "$RUNNER_TEMP/typecheck.log" 2>&1 < /dev/null &
153 +
154 - name: Finish installing browser secret helper build libraries
155 + id: apt
156 + if: ${{ !cancelled() && needs.changes.outputs.build != 'false' }}
157 timeout-minutes: 5
158 run: |
159 until test -s "$RUNNER_TEMP/apt-status"; do sleep 1; done
@@ -172,11 +161,22 @@ jobs:
161 exit "$(cat "$RUNNER_TEMP/apt-status")"
162
163 - name: Build desktop pipeline
164 + id: build
165 + if: ${{ !cancelled() && steps.electron.outcome == 'success' && steps.apt.outcome == 'success' && needs.changes.outputs.build != 'false' }}
166 run: vp run build:desktop
167
168 - name: Verify preload bundle output
169 + if: ${{ !cancelled() && steps.build.outcome == 'success' }}
170 run: node apps/desktop/scripts/verify-preload-bundle.mjs
171
172 + - name: Typecheck
173 + if: ${{ !cancelled() && steps.typecheck.outcome == 'success' }}
174 + timeout-minutes: 5
175 + run: |
176 + until test -s "$RUNNER_TEMP/typecheck-status"; do sleep 1; done
177 + cat "$RUNNER_TEMP/typecheck.log"
178 + exit "$(cat "$RUNNER_TEMP/typecheck-status")"
179 +
180 # Everything except `t3` (apps/server) and the web app, which has its own job
181 # below. `--parallel` drops the package dependency ordering that `vp run`
182 # applies by default: these `test` tasks declare no `dependsOn` and resolve
@@ -510,7 +510,6 @@ jobs:
510 [
511 changes,
512 lint,
513 - typecheck,
513 build,
514 test,
515 test_web,
@@ -528,10 +527,12 @@ jobs:
527 RESULTS: ${{ toJSON(needs) }}
528 run: |
529 echo "$RESULTS" | jq -r 'to_entries[] | "\(.key): \(.value.result)"'
531 - # A job may skip only when `changes` said it was not needed. Gates are
532 - # keyed by job name, except the macOS lint and the transfer report.
530 + # A job may skip only when `changes` said every gate it represents was
531 + # not needed. Gates are keyed by job name, except merged Build, the
532 + # macOS lint, and the transfer report.
533 echo "$RESULTS" | jq -e '.changes.outputs as $gates
534 - | {mobile_native_static_analysis: "mobile_native", "transfer-report": "test_server"} as $renamed
534 + | {build: ["build", "typecheck"], mobile_native_static_analysis: ["mobile_native"], "transfer-report": ["test_server"]} as $renamed
535 | all(to_entries[];
536 .value.result == "success"
537 - or (.value.result == "skipped" and $gates[$renamed[.key] // .key] == "false"))' > /dev/null
537 + or (.value.result == "skipped"
538 + and (($renamed[.key] // [.key]) | all(.[]; $gates[.] == "false"))))' > /dev/null