ReviewOS

also looking at this

stacks/wildloop

feat: native trail maps and complete native mobile screens

#1017
Draft chris wants to merge codex/trail-experience into main
60 files +2505 -823
.github/workflows/mobile-e2e.ymlmodified+72-14
Changes to .github/workflows/mobile-e2e.yml
@@ -8,6 +8,8 @@ on:
88 - '.maestro/**'
99 - 'tests/native/**'
1010 - 'scripts/run-native-trail-e2e.ts'
11 - 'scripts/run-native-trail-android-e2e.ts'
12 - 'scripts/run-owned-android-e2e.ts'
1113 - 'app/**'
1214 - 'config/mobile.ts'
1315 # The app icon config/mobile.ts points at; a bad one fails the iOS build.
@@ -21,6 +23,8 @@ on:
2123 - '.maestro/**'
2224 - 'tests/native/**'
2325 - 'scripts/run-native-trail-e2e.ts'
26 - 'scripts/run-native-trail-android-e2e.ts'
27 - 'scripts/run-owned-android-e2e.ts'
2428 - 'app/**'
2529 - 'config/mobile.ts'
2630 # The app icon config/mobile.ts points at; a bad one fails the iOS build.
@@ -53,7 +57,10 @@ jobs:
5357 distribution: temurin
5458 java-version: '17'
5559 - name: Setup Pantry
56 uses: home-lang/pantry/packages/action@main
60 uses: pantry-pm/pantry/packages/action@da17bb9317e8f8c247618fb176fe97269f15bfe4 # v0.11.94
61 with:
62 version: '0.11.94'
63 install: 'false'
5764 - name: Install Maestro
5865 run: |
5966 curl -fsSL "https://github.com/mobile-dev-inc/Maestro/releases/download/${MAESTRO_VERSION}/maestro.zip" -o "$RUNNER_TEMP/maestro.zip"
@@ -75,8 +82,6 @@ jobs:
7582 if-no-files-found: warn
7683
7784 android:
78 env:
79 ANDROID_MAPS_API_KEY: ${{ secrets.ANDROID_MAPS_API_KEY }}
8085 runs-on: ubuntu-latest
8186 timeout-minutes: 30
8287 steps:
@@ -91,6 +96,11 @@ jobs:
9196 - uses: gradle/actions/setup-gradle@v4
9297 with:
9398 gradle-version: '8.11.1'
99 - uses: android-actions/setup-android@v4
100 with:
101 packages: platform-tools
102 - name: Install the published SDK compile platform
103 run: sdkmanager "platforms;android-36" "build-tools;36.0.0"
94104 - name: Enable KVM
95105 run: |
96106 echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
@@ -107,15 +117,7 @@ jobs:
107117 - name: Build Android E2E app
108118 run: bun scripts/run-mobile-e2e.ts android --build-only
109119 - name: Run Android E2E flows
110 uses: reactivecircus/android-emulator-runner@v2
111 with:
112 api-level: 34
113 target: google_apis
114 arch: x86_64
115 profile: pixel_7
116 ram-size: 4096M
117 disable-animations: true
118 script: bun scripts/run-mobile-e2e.ts android --skip-build
120 run: bun scripts/run-owned-android-e2e.ts baseline
119121 - name: Upload Android diagnostics
120122 if: always()
121123 uses: actions/upload-artifact@v5
@@ -125,17 +127,25 @@ jobs:
125127 if-no-files-found: warn
126128
127129 native-trail-ios:
130 strategy:
131 fail-fast: false
132 matrix:
133 group: [maps, reviews, utilities, navigation]
128134 runs-on: macos-latest
129135 timeout-minutes: 35
130136 env:
131137 QA_PORT_BASE: '6320'
138 NATIVE_TRAIL_GROUP: ${{ matrix.group }}
132139 steps:
133140 - uses: actions/checkout@v5
134141 - uses: oven-sh/setup-bun@v2
135142 with:
136143 bun-version: '1.4.2'
137144 - name: Setup Pantry
138 uses: home-lang/pantry/packages/action@main
145 uses: pantry-pm/pantry/packages/action@da17bb9317e8f8c247618fb176fe97269f15bfe4 # v0.11.94
146 with:
147 version: '0.11.94'
148 install: 'false'
139149 - name: Install dependencies
140150 run: bun install --frozen-lockfile
141151 - name: Install iOS toolchain
@@ -168,10 +178,58 @@ jobs:
168178 if: always()
169179 uses: actions/upload-artifact@v5
170180 with:
171 name: native-trail-ios
181 name: native-trail-ios-${{ matrix.group }}
172182 path: |
173183 storage/framework/runtime/e2e/native-trail/*.log
174184 storage/framework/runtime/e2e/native-trail/*.txt
185 storage/framework/runtime/e2e/native-trail/*-persistence.json
175186 storage/framework/runtime/e2e/native-trail/*.png
176187 storage/framework/runtime/e2e/native-trail/results-*.xcresult
177188 if-no-files-found: warn
189
190 native-trail-android:
191 runs-on: ubuntu-latest
192 timeout-minutes: 35
193 env:
194 QA_PORT_BASE: '7320'
195 steps:
196 - uses: actions/checkout@v5
197 - uses: oven-sh/setup-bun@v2
198 with:
199 bun-version: '1.4.2'
200 - uses: actions/setup-java@v5
201 with:
202 distribution: temurin
203 java-version: '17'
204 - uses: gradle/actions/setup-gradle@v4
205 with:
206 gradle-version: '8.11.1'
207 - uses: android-actions/setup-android@v4
208 with:
209 packages: platform-tools
210 - name: Install the published SDK compile platform
211 run: sdkmanager "platforms;android-36" "build-tools;36.0.0"
212 - name: Install Maestro
213 run: |
214 curl -fsSL "https://github.com/mobile-dev-inc/Maestro/releases/download/${MAESTRO_VERSION}/maestro.zip" -o "$RUNNER_TEMP/maestro.zip"
215 echo "$MAESTRO_SHA256 $RUNNER_TEMP/maestro.zip" | sha256sum --check
216 unzip -q "$RUNNER_TEMP/maestro.zip" -d "$RUNNER_TEMP/maestro-cli"
217 echo "$RUNNER_TEMP/maestro-cli/maestro/bin" >> "$GITHUB_PATH"
218 - name: Install published dependencies
219 run: bun install --frozen-lockfile
220 - name: Build native MapLibre trail app
221 run: bun scripts/run-native-trail-android-e2e.ts --build-only
222 - name: Enable KVM
223 run: |
224 echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
225 sudo udevadm control --reload-rules
226 sudo udevadm trigger --name-match=kvm
227 - name: Test native maps, sticky actions and persisted reviews
228 run: bun scripts/run-owned-android-e2e.ts native-trail
229 - name: Upload Android native trail evidence
230 if: always()
231 uses: actions/upload-artifact@v5
232 with:
233 name: native-trail-android
234 path: storage/framework/runtime/e2e/native-trail-android
235 if-no-files-found: warn