mirror of
https://github.com/stablyai/orca.git
synced 2026-11-03 18:47:40 +00:00
build(mobile): move to TypeScript 7 and Vitest 5, typecheck through the root tsrs runner (#33419)
- Bump mobile typescript to ^7.0.2 and vitest to 5.0.5; keep TypeScript 6 as typescript-api for the test-support code that walks the AST, mirroring the root. - Patch Expo CLI's tsconfig reader to fall back to typescript-api: TypeScript 7 has no compiler API, and Metro otherwise crashes reading tsconfig paths. - Register mobile/tsconfig.json and mobile/tsconfig.test.json with the root typecheck runner; locally they use incremental tsrs (Bun elsewhere), CI uses Bun like root CI. - Route the tests-typecheck ratchet through the same compiler selection. - Enforce root/mobile parity for typescript, typescript-api and vitest.
This commit is contained in:
@@ -32,6 +32,10 @@ on:
|
||||
- '.github/workflows/mobile.yml'
|
||||
- 'config/mobile-ci.vitest.config.mjs'
|
||||
- 'config/scripts/run-mobile-ci-tests.mjs'
|
||||
# Mobile typechecks run through the root compiler selection.
|
||||
- 'config/scripts/run-typecheck-projects-in-parallel.mjs'
|
||||
- 'config/scripts/tsrs-typecheck-compiler.mjs'
|
||||
- 'config/scripts/pinned-bun-executable.mjs'
|
||||
- 'config/oxlint-code-quality-native-plugins.json'
|
||||
- 'config/.bun-version'
|
||||
- '.github/actions/install-node-dependencies/**'
|
||||
@@ -76,6 +80,9 @@ on:
|
||||
- '.github/workflows/mobile.yml'
|
||||
- 'config/mobile-ci.vitest.config.mjs'
|
||||
- 'config/scripts/run-mobile-ci-tests.mjs'
|
||||
- 'config/scripts/run-typecheck-projects-in-parallel.mjs'
|
||||
- 'config/scripts/tsrs-typecheck-compiler.mjs'
|
||||
- 'config/scripts/pinned-bun-executable.mjs'
|
||||
- 'config/.bun-version'
|
||||
- '.github/actions/install-node-dependencies/**'
|
||||
- '.github/actions/setup-pnpm/**'
|
||||
@@ -114,7 +121,7 @@ jobs:
|
||||
# from the Gemfile, which is how the release jobs could land on different
|
||||
# fastlane versions in the first place. Fail here instead.
|
||||
BUNDLE_FROZEN: 'true'
|
||||
ORCA_MOBILE_TYPECHECK_COMPILER: 'native'
|
||||
ORCA_MOBILE_TYPECHECK_COMPILER: 'bun'
|
||||
|
||||
defaults:
|
||||
run:
|
||||
@@ -171,9 +178,7 @@ jobs:
|
||||
- name: Typecheck
|
||||
id: production-types
|
||||
background: true
|
||||
env:
|
||||
GOMAXPROCS: '2'
|
||||
run: node scripts/typecheck-mobile.mjs
|
||||
run: node ../config/scripts/run-typecheck-projects-in-parallel.mjs --compiler=bun --bun-threads=2 --project=mobile/tsconfig.json
|
||||
|
||||
# Why a ratchet and not the raw typecheck: mobile/tsconfig.json excludes test files, so until
|
||||
# tsconfig.test.json existed nothing checked them, and at introduction 127 of the 632 had
|
||||
@@ -182,8 +187,6 @@ jobs:
|
||||
- name: Typecheck tests (ratchet)
|
||||
id: test-types
|
||||
background: true
|
||||
env:
|
||||
GOMAXPROCS: '2'
|
||||
run: node scripts/check-tests-typecheck-ratchet.mjs
|
||||
|
||||
# This includes the bridged replay of the whole recording corpus, which used to be a second
|
||||
@@ -304,7 +307,7 @@ jobs:
|
||||
main-tests:
|
||||
name: Mobile tests on main
|
||||
env:
|
||||
ORCA_MOBILE_TYPECHECK_COMPILER: 'native'
|
||||
ORCA_MOBILE_TYPECHECK_COMPILER: 'bun'
|
||||
if: github.event_name == 'push'
|
||||
# Why ARM: the same pure-Node Vitest run `verify` makes on a pull request.
|
||||
runs-on: blacksmith-4vcpu-ubuntu-2404-arm
|
||||
@@ -331,15 +334,11 @@ jobs:
|
||||
- name: Typecheck
|
||||
id: production-types
|
||||
background: true
|
||||
env:
|
||||
GOMAXPROCS: '2'
|
||||
run: node scripts/typecheck-mobile.mjs
|
||||
run: node ../config/scripts/run-typecheck-projects-in-parallel.mjs --compiler=bun --bun-threads=2 --project=mobile/tsconfig.json
|
||||
|
||||
- name: Typecheck tests (ratchet)
|
||||
id: test-types
|
||||
background: true
|
||||
env:
|
||||
GOMAXPROCS: '2'
|
||||
run: node scripts/check-tests-typecheck-ratchet.mjs
|
||||
|
||||
# The whole suite, not only the recordings: the mutant and page-bridge suites read the goldens
|
||||
|
||||
Reference in New Issue
Block a user