chore: update dependencies #56
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: E2E tests on Expo iOS project | |
on: | |
push: | |
branches: [main, '*-stable'] | |
paths: | |
- .github/workflows/expo-ios.yml | |
- src/iosexecutor/** | |
- src/v8runtime/** | |
- package.json | |
- bun.lockb | |
pull_request: | |
paths: | |
- .github/workflows/expo-ios.yml | |
- src/iosexecutor/** | |
- src/v8runtime/** | |
- package.json | |
- bun.lockb | |
jobs: | |
e2e-test: | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: oven-sh/setup-bun@v1 | |
- name: 🔨 Switch to Xcode 15.4 | |
run: sudo xcode-select --switch /Applications/Xcode_15.4.app | |
- name: Restore node_modules caches | |
uses: actions/cache@v4 | |
with: | |
path: node_modules | |
key: ${{ runner.os }}-workspace-modules-${{ hashFiles('bun.lockb') }} | |
- name: Bun install | |
run: bun install --frozen-lockfile | |
- name: Generate TestApp | |
run: | | |
bunx create-expo-app -t blank@@sdk-51 TestApp | |
cd TestApp | |
bun add v8-ios | |
bun add file:${ github.workspace }}/react-native-v8 | |
jq '.expo.ios.bundleIdentifier = "com.testapp" | .expo.plugins += [["react-native-v8", {"ios":true}]] | .expo.jsEngine = "jsc"' app.json > app.json.tmp && mv -f app.json.tmp app.json | |
echo 'if (global._v8runtime) { console.log(`=== V8 version[${global._v8runtime().version}] ===`); }' >> App.js | |
working-directory: ${{ runner.temp }} | |
- name: Build TestApp | |
working-directory: ${{ runner.temp }}/TestApp | |
run: | | |
npx expo prebuild -p ios | |
cd ios | |
xcodebuild -workspace ./TestApp.xcworkspace -scheme TestApp -configuration Release -derivedDataPath ./build -destination 'generic/platform=iOS Simulator' build | xcpretty | |
- name: Run TestApp | |
working-directory: ${{ runner.temp }}/TestApp/ios | |
run: | | |
SIMUDID=$(xcrun simctl list devices available -j | jq -r '.devices."com.apple.CoreSimulator.SimRuntime.iOS-17-5"[] | select(.name=="iPhone 15 Pro") | .udid') | |
echo "Using simulator udid[${SIMUDID}]" | |
xcrun simctl boot ${SIMUDID} | |
xcrun simctl install booted ./build/Build/Products/Release-iphonesimulator/TestApp.app | |
xcrun simctl spawn booted log stream --predicate 'process == "TestApp"' --level=debug > sim.log & | |
LOG_PID=$! | |
xcrun simctl launch booted com.testapp | |
sleep 5 | |
kill -SIGINT $LOG_PID | |
grep -E "=== V8 version\[.+\] ===" sim.log > /dev/null | |
- name: Collect failure files | |
if: failure() | |
run: | | |
cp "${{ runner.temp }}/TestApp/ios/sim.log" . | |
- name: Upload failed artifacts | |
if: failure() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: artifacts | |
path: | | |
sim.log |