mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Add Caching to e2e tests to save time (#38842)
Summary: The iOS e2e testing is not caching the cocoapods properly. With this change, we are adding the cache to save some time. ## Changelog: [Internal] - Add caching to iOS e2e jobs Pull Request resolved: https://github.com/facebook/react-native/pull/38842 Test Plan: CircleCI stays green; the job that is using the cache runs faster. | BEFORE | AFTER | | --- | --- | | <img width="554" alt="Screenshot 2023-08-09 at 09 38 48" src="https://github.com/facebook/react-native/assets/11162307/5f175d5d-7dd2-4a55-acab-2063356d2a71"> | <img width="555" alt="Screenshot 2023-08-09 at 09 39 03" src="https://github.com/facebook/react-native/assets/11162307/7058b1eb-6d94-4659-a220-da2f81a9e833"> | Reviewed By: rshest Differential Revision: D48183742 Pulled By: cipolleschi fbshipit-source-id: d55f492751535e4c84b09bb57173ebc2319e02b4
This commit is contained in:
committed by
Facebook GitHub Bot
parent
c956a1bd6c
commit
494916ec9c
+29
-27
@@ -890,36 +890,38 @@ jobs:
|
||||
package: cmake
|
||||
- setup_ruby:
|
||||
ruby_version: << parameters.ruby_version >>
|
||||
- run:
|
||||
name: Install Bundler
|
||||
command: |
|
||||
cd packages/rn-tester
|
||||
bundle check || bundle install
|
||||
bundle exec pod setup
|
||||
RCT_NEW_ARCH_ENABLED=1 bundle exec pod install --verbose
|
||||
- run:
|
||||
name: Boot iOS Simulator
|
||||
command: source scripts/.tests.env && xcrun simctl boot "$IOS_DEVICE" || true
|
||||
- run:
|
||||
name: Build app
|
||||
command: |
|
||||
xcodebuild build \
|
||||
-workspace packages/rn-tester/RNTesterPods.xcworkspace \
|
||||
-configuration Debug \
|
||||
-scheme RNTester \
|
||||
-sdk iphonesimulator \
|
||||
-derivedDataPath /tmp/e2e/
|
||||
- run:
|
||||
name: Move app to correct directory
|
||||
command: mv /tmp/e2e/Build/Products/Debug-iphonesimulator/RNTester.app packages/rn-tester-e2e/apps/rn-tester.app
|
||||
- run:
|
||||
name: Check Appium server status
|
||||
command: scripts/circleci/check_appium_server_status.sh
|
||||
- run:
|
||||
name: Run E2E tests
|
||||
command: |
|
||||
cd packages/rn-tester-e2e
|
||||
yarn test-e2e ios
|
||||
- with_xcodebuild_cache:
|
||||
steps:
|
||||
- run:
|
||||
name: Install Bundler
|
||||
command: |
|
||||
cd packages/rn-tester
|
||||
bundle check || bundle install
|
||||
bundle exec pod setup
|
||||
RCT_NEW_ARCH_ENABLED=1 bundle exec pod install --verbose
|
||||
- run:
|
||||
name: Build app
|
||||
command: |
|
||||
xcodebuild build \
|
||||
-workspace packages/rn-tester/RNTesterPods.xcworkspace \
|
||||
-configuration Debug \
|
||||
-scheme RNTester \
|
||||
-sdk iphonesimulator \
|
||||
-derivedDataPath /tmp/e2e/
|
||||
- run:
|
||||
name: Move app to correct directory
|
||||
command: mv /tmp/e2e/Build/Products/Debug-iphonesimulator/RNTester.app packages/rn-tester-e2e/apps/rn-tester.app
|
||||
- run:
|
||||
name: Check Appium server status
|
||||
command: scripts/circleci/check_appium_server_status.sh
|
||||
- run:
|
||||
name: Run E2E tests
|
||||
command: |
|
||||
cd packages/rn-tester-e2e
|
||||
yarn test-e2e ios
|
||||
|
||||
# -------------------------
|
||||
# JOBS: Android E2E Tests
|
||||
|
||||
Reference in New Issue
Block a user