diff --git a/.github/workflows/test-all.yml b/.github/workflows/test-all.yml index a10e8836750..ab538f0f6ae 100644 --- a/.github/workflows/test-all.yml +++ b/.github/workflows/test-all.yml @@ -213,6 +213,72 @@ jobs: jsengine: ${{ matrix.jsengine }} maestro-flow: ./packages/rn-tester/.maestro/ + test_e2e_ios_templateapp: + runs-on: macos-13 + needs: build_npm_package + env: + HERMES_WS_DIR: /tmp/hermes + HERMES_TARBALL_ARTIFACTS_DIR: /tmp/hermes/hermes-runtime-darwin + continue-on-error: true + strategy: + fail-fast: false + matrix: + jsengine: [Hermes, JSC] + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Setup xcode + uses: ./.github/actions/setup-xcode + - name: Setup node.js + uses: ./.github/actions/setup-node + - name: Run yarn + uses: ./.github/actions/yarn-install-with-cache + - name: Setup ruby + uses: ruby/setup-ruby@v1.170.0 + with: + ruby-version: 2.6.10 + - name: Download Hermes + uses: actions/download-artifact@v4 + with: + name: hermes-darwin-bin-Release + path: /tmp/react-native-tmp + - name: Download React Native Package + uses: actions/download-artifact@v4 + with: + name: react-native-package + path: /tmp/react-native-tmp + - name: Print /tmp folder + run: ls -lR /tmp/react-native-tmp + - name: Prepare artifacts + run: | + REACT_NATIVE_PKG=$(find /tmp/react-native-tmp -type f -name "*.tgz") + echo "React Native tgs is $REACT_NATIVE_PKG" + + HERMES_PATH=$(find /tmp/react-native-tmp -type f -name "*.tar.gz") + echo "Hermes path is $HERMES_PATH" + + # TODO: from next/latest/main convert to branch + node ./scripts/e2e/init-project-e2e.js --projectName RNTestProject --currentBranch 0.75-stable --directory /tmp/RNTestProject --pathToLocalReactNative $REACT_NATIVE_PKG + + cd /tmp/RNTestProject/ios + bundle install + HERMES_ENGINE_TARBALL_PATH=$HERMES_PATH bundle exec pod install + + xcrun xcodebuild \ + -scheme "RNTestProject" \ + -workspace RNTestProject.xcworkspace \ + -configuration "Release" \ + -sdk "iphonesimulator" \ + -destination "generic/platform=iOS Simulator" \ + -derivedDataPath "/tmp/RNTestProject" + - name: Run E2E Tests + uses: ./.github/actions/maestro-ios + with: + app-path: "/tmp/RNTestProject/Build/Products/Release-iphonesimulator/RNTestProject.app" + app-id: org.reactjs.native.example.RNTestProject + jsengine: ${{ matrix.jsengine }} + maestro-flow: ./scripts/e2e/.maestro/ + build_hermesc_linux: runs-on: ubuntu-latest needs: prepare_hermes_workspace