also looking at this
fix(mobile): preserve native editing, navigation, and durable media requests
#369
36 files
+864
-185
Review threads live on the whole diff, not on one commit, so none are shown here - a thread's line means something in the branch's final form, and painting it into an intermediate step would put it on code it is not about.
| @@ -154,7 +154,7 @@ jobs: | ||
| 154 | 154 | - name: Setup Bun |
| 155 | 155 | uses: oven-sh/setup-bun@v2 |
| 156 | 156 | with: |
| 157 | bun-version: '1.3.14' | |
| 157 | bun-version: '1.4.2' | |
| 158 | 158 | |
| 159 | 159 | - name: Install XcodeGen |
| 160 | 160 | run: brew install xcodegen |
| @@ -176,10 +176,7 @@ jobs: | ||
| 176 | 176 | - name: Install stx compiler dependencies |
| 177 | 177 | if: ${{ startsWith(matrix.suite, 'navigation') }} |
| 178 | 178 | working-directory: .stx-compiler |
| 179 | # Pantry ships Bun 1.3.14, which cannot frozen-install the pinned stx | |
| 180 | # lockfile. Resolve the unchanged external manifest without rewriting | |
| 181 | # its checkout; Craft's own install remains frozen above. | |
| 182 | run: bun install --no-save | |
| 179 | run: bun install --frozen-lockfile | |
| 183 | 180 | |
| 184 | 181 | - name: Test native UIKit reconciliation |
| 185 | 182 | id: uikit |
| @@ -274,6 +271,11 @@ jobs: | ||
| 274 | 271 | with: |
| 275 | 272 | version: '0.11.94' |
| 276 | 273 | |
| 274 | - name: Setup Bun for the frozen stx compiler lockfile | |
| 275 | uses: oven-sh/setup-bun@v2 | |
| 276 | with: | |
| 277 | bun-version: '1.4.2' | |
| 278 | ||
| 277 | 279 | - name: Install XcodeGen |
| 278 | 280 | run: brew install xcodegen |
| 279 | 281 | |
| @@ -294,10 +296,7 @@ jobs: | ||
| 294 | 296 | |
| 295 | 297 | - name: Install stx compiler dependencies |
| 296 | 298 | working-directory: .stx-compiler |
| 297 | # Pantry ships Bun 1.3.14, which cannot frozen-install the pinned stx | |
| 298 | # lockfile. Resolve the unchanged external manifest without rewriting | |
| 299 | # its checkout; Craft's own install remains frozen above. | |
| 300 | run: bun install --no-save | |
| 299 | run: bun install --frozen-lockfile | |
| 301 | 300 | |
| 302 | 301 | - name: Test hybrid web navigation transitions |
| 303 | 302 | env: |
| @@ -407,6 +406,11 @@ jobs: | ||
| 407 | 406 | with: |
| 408 | 407 | version: '0.11.94' |
| 409 | 408 | |
| 409 | - name: Setup Bun for the frozen stx compiler lockfile | |
| 410 | uses: oven-sh/setup-bun@v2 | |
| 411 | with: | |
| 412 | bun-version: '1.4.2' | |
| 413 | ||
| 410 | 414 | - name: Setup Java |
| 411 | 415 | uses: actions/setup-java@v6 |
| 412 | 416 | with: |
| @@ -442,8 +446,7 @@ jobs: | ||
| 442 | 446 | |
| 443 | 447 | - name: Install Android stx compiler dependencies |
| 444 | 448 | working-directory: .stx-compiler |
| 445 | # Keep this @stacksjs/stx compiler install aligned with the iOS job. | |
| 446 | run: bun install --no-save | |
| 449 | run: bun install --frozen-lockfile | |
| 447 | 450 | |
| 448 | 451 | - name: Cache Zig artifacts |
| 449 | 452 | uses: actions/cache@v5 |
| @@ -629,7 +632,7 @@ jobs: | ||
| 629 | 632 | - uses: actions/checkout@v6 |
| 630 | 633 | - uses: oven-sh/setup-bun@v2 |
| 631 | 634 | with: |
| 632 | bun-version: '1.3.14' | |
| 635 | bun-version: '1.4.2' | |
| 633 | 636 | - uses: actions/setup-java@v6 |
| 634 | 637 | with: |
| 635 | 638 | distribution: temurin |
| @@ -647,7 +650,7 @@ jobs: | ||
| 647 | 650 | repository: stacksjs/stx |
| 648 | 651 | ref: 0d85afbab4b569ac2f09113a6c9a5d11d926145f |
| 649 | 652 | path: .stx-compiler |
| 650 | - run: bun install --no-save | |
| 653 | - run: bun install --frozen-lockfile | |
| 651 | 654 | working-directory: .stx-compiler |
| 652 | 655 | - name: Compile native fixtures before booting Android |
| 653 | 656 | id: native-project |
| @@ -14,7 +14,7 @@ type Job = { | ||
| 14 | 14 | if?: string |
| 15 | 15 | uses?: string |
| 16 | 16 | with?: { enforce_high?: boolean, 'release-draft'?: string, release?: string, version?: string } |
| 17 | steps?: { name?: string, run?: string, uses?: string, env?: Record<string, string>, with?: { 'version'?: string, 'bun-version'?: string, 'publish'?: string, 'release-draft'?: string, release?: string, 'package-dir'?: string, install?: string } }[] | |
| 17 | steps?: { name?: string, run?: string, uses?: string, 'working-directory'?: string, env?: Record<string, string>, with?: { 'version'?: string, 'bun-version'?: string, 'publish'?: string, 'release-draft'?: string, release?: string, 'package-dir'?: string, install?: string } }[] | |
| 18 | 18 | strategy?: { 'fail-fast'?: boolean, matrix: { platform: { name: string, os: string }[] } } |
| 19 | 19 | } |
| 20 | 20 | const release = Bun.YAML.parse(readFileSync(join(import.meta.dir, '../.github/workflows/release.yml'), 'utf8')) as { jobs: Record<string, Job> } |
| @@ -67,6 +67,20 @@ test('mobile device jobs use the same pinned stx compiler', () => { | ||
| 67 | 67 | expect((step.with as Record<string, string>).ref).toBe(stxCompilerCommit) |
| 68 | 68 | }) |
| 69 | 69 | |
| 70 | test('native compiler jobs use a supported Bun and preserve its frozen lockfile', () => { | |
| 71 | const workflow = Bun.YAML.parse(readFileSync(join(import.meta.dir, '../.github/workflows/mobile-e2e.yml'), 'utf8')) as { jobs: Record<string, Job> } | |
| 72 | for (const name of ['ios-native', 'ios-simulator', 'android-emulator', 'android-navigation']) { | |
| 73 | const job = workflow.jobs[name] | |
| 74 | const jobSteps = job.steps ?? [] | |
| 75 | const tool = jobSteps.findIndex(step => step.uses === 'oven-sh/setup-bun@v2' && step.with?.['bun-version'] === '1.4.2') | |
| 76 | const install = jobSteps.findIndex(step => step['working-directory'] === '.stx-compiler') | |
| 77 | expect(tool).toBeGreaterThanOrEqual(0) | |
| 78 | expect(install).toBeGreaterThan(tool) | |
| 79 | expect(jobSteps[install].run).toBe('bun install --frozen-lockfile') | |
| 80 | expect(steps(job)).not.toContain('bun install --no-save') | |
| 81 | } | |
| 82 | }) | |
| 83 | ||
| 70 | 84 | test('native iOS suites and protocol checks have independent required jobs', () => { |
| 71 | 85 | const workflow = Bun.YAML.parse(readFileSync(join(import.meta.dir, '../.github/workflows/mobile-e2e.yml'), 'utf8')) as { jobs: Record<string, Job> } |
| 72 | 86 | const native = workflow.jobs['ios-native'] |