From e41da8f492950930246fdc93f9f38b5c2159a869 Mon Sep 17 00:00:00 2001 From: Gio Lodi Date: Tue, 16 Apr 2024 16:44:43 +1000 Subject: [PATCH] Don't waste time cleaning up Simulators in CI --- fastlane/Fastfile | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/fastlane/Fastfile b/fastlane/Fastfile index db4b4a078..258f9694f 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -8,29 +8,23 @@ TEST_DEVICE = 'iPhone 15' platform :ios do desc 'Builds the project and runs tests' lane :test do - device = create_simulator(TEST_RUNTIME, TEST_DEVICE) + # Don't waste time managing Simulators in CI + device = create_simulator(TEST_RUNTIME, TEST_DEVICE) unless is_ci - run_tests( + shared_options = { workspace: 'Aztec.xcworkspace', - scheme: 'Aztec', - device: device.name, prelaunch_simulator: true, buildlog_path: File.join(__dir__, '.build', 'logs'), derived_data_path: File.join(__dir__, '.build', 'derived-data'), ensure_devices_found: true - ) + } - run_tests( - workspace: 'Aztec.xcworkspace', - scheme: 'WordPressEditor', - device: device.name, - prelaunch_simulator: true, - buildlog_path: File.join(__dir__, '.build', 'logs'), - derived_data_path: File.join(__dir__, '.build', 'derived-data'), - ensure_devices_found: true - ) + shared_options[:device] = device.name unless is_ci + + run_tests(**shared_options, scheme: 'Aztec') + run_tests(**shared_options, scheme: 'WordPressEditor') - destroy_simulator(device) + destroy_simulator(device) unless is_ci end end