fix: disable shared global context and fix reanimated hanging issue #66
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 | |
- yarn.lock | |
pull_request: | |
paths: | |
- .github/workflows/expo-ios.yml | |
- src/iosexecutor/** | |
- src/v8runtime/** | |
- package.json | |
- yarn.lock | |
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 yarn caches | |
uses: actions/cache@v4 | |
with: | |
path: node_modules | |
key: ${{ runner.os }}-workspace-modules-${{ hashFiles('yarn.lock') }} | |
- name: Yarn install | |
run: yarn install --frozen-lockfile | |
- name: Generate TestApp | |
run: | | |
yarn create expo-app -t blank@@sdk-51 TestApp | |
cd TestApp | |
yarn add v8-ios | |
yarn add file:../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: .. | |
- name: Build TestApp | |
working-directory: ../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: ../TestApp/ios | |
run: | | |
set -x | |
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 20 | |
kill -SIGINT $LOG_PID | |
set +e | |
grep -E "=== V8 version\[.+\] ===" sim.log > /dev/null | |
BUILD_STATUS=$? | |
set -e | |
echo "BUILD_STATUS=$BUILD_STATUS" | |
exit $BUILD_STATUS | |
- name: Collect failure files | |
if: failure() | |
run: | | |
cp ../TestApp/ios/sim.log . | |
- name: Upload failed artifacts | |
if: failure() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: artifacts | |
path: | | |
sim.log |