From 377b983c8611975de36b197520c5a607ad510fcb Mon Sep 17 00:00:00 2001 From: Ur-imazing Date: Tue, 10 Mar 2026 11:13:37 +1300 Subject: [PATCH 1/4] chore(mobile-expo): add CI lint, typecheck, and build for Expo app Add @forge/expo to the affected-package detection in CI, exclude it from the monorepo-wide lint job, and add a dedicated lint-expo job that runs lint (--max-warnings=0), typecheck, and build when Expo code changes. Mirrors the existing lint-ios and lint-android pattern. Resolves #96 Co-Authored-By: Claude Opus 4.6 --- .github/workflows/ci.yml | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d2ebae34..66b9b4c9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -39,6 +39,7 @@ jobs: outputs: mobile_ios: ${{ steps.affected.outputs.mobile_ios }} mobile_android: ${{ steps.affected.outputs.mobile_android }} + mobile_expo: ${{ steps.affected.outputs.mobile_expo }} steps: - name: Checkout uses: actions/checkout@v6 @@ -58,9 +59,10 @@ jobs: run: | BASE="${{ github.event.pull_request.base.sha || github.event.before }}" TURBO_OUT=$(TURBO_SCM_BASE="$BASE" pnpm turbo run lint --affected --dry-run=json 2>&1) || true - AFFECTED=$(echo "$TURBO_OUT" | jq -r '[.tasks[].package] | map(select(. == "@forge/mobile-ios" or . == "@forge/mobile-android")) | .[]' 2>&1 || echo "") + AFFECTED=$(echo "$TURBO_OUT" | jq -r '[.tasks[].package] | map(select(. == "@forge/mobile-ios" or . == "@forge/mobile-android" or . == "@forge/expo")) | .[]' 2>&1 || echo "") echo "mobile_ios=$(echo "$AFFECTED" | grep -q "@forge/mobile-ios" && echo "true" || echo "false")" >> $GITHUB_OUTPUT echo "mobile_android=$(echo "$AFFECTED" | grep -q "@forge/mobile-android" && echo "true" || echo "false")" >> $GITHUB_OUTPUT + echo "mobile_expo=$(echo "$AFFECTED" | grep -q "@forge/expo" && echo "true" || echo "false")" >> $GITHUB_OUTPUT generated-code: runs-on: ubuntu-latest @@ -100,7 +102,7 @@ jobs: - name: Check format run: pnpm run format:check - name: Lint JS/TS - run: pnpm turbo run lint --filter='!@forge/mobile-*' --filter='!@forge/infra' -- --max-warnings=0 + run: pnpm turbo run lint --filter='!@forge/mobile-*' --filter='!@forge/expo' --filter='!@forge/infra' -- --max-warnings=0 - name: Test run: pnpm test - name: Build @@ -118,6 +120,29 @@ jobs: - name: SwiftLint run: cd mobile/ios && swiftlint lint --strict + lint-expo: + runs-on: ubuntu-latest + needs: affected + if: needs.affected.outputs.mobile_expo == 'true' + steps: + - name: Checkout + uses: actions/checkout@v6 + - name: Setup pnpm + uses: pnpm/action-setup@v4 + - name: Setup Node + uses: actions/setup-node@v6 + with: + node-version-file: .nvmrc + cache: pnpm + - name: Install dependencies + run: pnpm install --frozen-lockfile + - name: Lint + run: pnpm --filter @forge/expo run lint -- --max-warnings=0 + - name: Typecheck + run: pnpm --filter @forge/expo run typecheck + - name: Build + run: pnpm --filter @forge/expo run build + lint-android: runs-on: ubuntu-latest needs: affected From b1519d54bbfabb8aeb06008566ce23e72e4e4513 Mon Sep 17 00:00:00 2001 From: Ur-imazing Date: Tue, 10 Mar 2026 11:20:31 +1300 Subject: [PATCH 2/4] chore(mobile-expo): swap no-op build script for expo export Replace the echo placeholder with `npx expo export --platform all` so CI validates the full Metro JS bundle for iOS and Android, catching broken imports and missing assets that typecheck alone cannot detect. Co-Authored-By: Claude Opus 4.6 --- mobile/expo/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mobile/expo/package.json b/mobile/expo/package.json index ee0c1c08..197cc9cd 100644 --- a/mobile/expo/package.json +++ b/mobile/expo/package.json @@ -10,7 +10,7 @@ "lint": "eslint .", "test": "jest", "typecheck": "tsc --noEmit", - "build": "echo 'Expo app has no production bundle step; use expo export or EAS when needed.'" + "build": "npx expo export --platform all" }, "dependencies": { "@apollo/client": "^4.1.4", From 423957da720386d9788ec4a530c35e711aa31e42 Mon Sep 17 00:00:00 2001 From: Ur-imazing Date: Tue, 10 Mar 2026 11:24:14 +1300 Subject: [PATCH 3/4] fix(ci): exclude @forge/expo from monorepo-wide build step The build-and-test job runs `pnpm build` across all packages, which now triggers `expo export --platform all` for @forge/expo. This fails because web dependencies (react-dom, react-native-web) are not installed. Exclude @forge/expo (and other mobile/infra packages) from the monorepo-wide build, matching the lint exclusion pattern. The dedicated lint-expo job handles Expo builds independently. Co-Authored-By: Claude Opus 4.6 --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 66b9b4c9..bf1e0923 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -106,7 +106,7 @@ jobs: - name: Test run: pnpm test - name: Build - run: pnpm build + run: pnpm turbo run build --filter='!@forge/mobile-*' --filter='!@forge/expo' --filter='!@forge/infra' lint-ios: runs-on: macos-latest From a8777ed35ac78a1332d50f560f020414e55f662d Mon Sep 17 00:00:00 2001 From: Ur-imazing Date: Tue, 10 Mar 2026 11:26:06 +1300 Subject: [PATCH 4/4] revert: remove package.json build change and build exclusion Revert the expo export build swap and build-and-test exclusion. The package.json change is out of scope for this CI-only issue. The build step remains a no-op echo, so no exclusion is needed. Co-Authored-By: Claude Opus 4.6 --- .github/workflows/ci.yml | 2 +- mobile/expo/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bf1e0923..66b9b4c9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -106,7 +106,7 @@ jobs: - name: Test run: pnpm test - name: Build - run: pnpm turbo run build --filter='!@forge/mobile-*' --filter='!@forge/expo' --filter='!@forge/infra' + run: pnpm build lint-ios: runs-on: macos-latest diff --git a/mobile/expo/package.json b/mobile/expo/package.json index 197cc9cd..ee0c1c08 100644 --- a/mobile/expo/package.json +++ b/mobile/expo/package.json @@ -10,7 +10,7 @@ "lint": "eslint .", "test": "jest", "typecheck": "tsc --noEmit", - "build": "npx expo export --platform all" + "build": "echo 'Expo app has no production bundle step; use expo export or EAS when needed.'" }, "dependencies": { "@apollo/client": "^4.1.4",