From 68846dfd8298e47c790f92f792d0fd4b37202052 Mon Sep 17 00:00:00 2001 From: Matt Oakes Date: Tue, 14 May 2019 13:20:30 -0700 Subject: [PATCH] feat: Allow the metro packager to be started from the test jobs --- src/jobs/android_test.yml | 8 ++++++++ src/jobs/ios_build_and_test.yml | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/src/jobs/android_test.yml b/src/jobs/android_test.yml index a7ff0ad..4a4e06d 100644 --- a/src/jobs/android_test.yml +++ b/src/jobs/android_test.yml @@ -8,6 +8,10 @@ parameters: description: Workspace root path that is either an absolute path or a path relative to the working directory. Defaults to '.' (the working directory). type: string default: . + start_metro: + description: If we should start the Metro packager in the background for this job. + type: boolean + default: false # For the start emulator command device_name: description: The name of the AVD. You use this name to tell which device to run tests on. Defaults to 'TestingAVD'. @@ -41,6 +45,10 @@ steps: at: <> - setup_macos_executor - yarn_install + - when: + condition: <> + steps: + - metro_start - android_emulator_start: device_name: <> platform_version: <> diff --git a/src/jobs/ios_build_and_test.yml b/src/jobs/ios_build_and_test.yml index 051fce2..8409234 100644 --- a/src/jobs/ios_build_and_test.yml +++ b/src/jobs/ios_build_and_test.yml @@ -16,6 +16,10 @@ parameters: description: Workspace root path that is either an absolute path or a path relative to the working directory. Defaults to '.' (the working directory). type: string default: . + start_metro: + description: If we should start the Metro packager in the background for this job. + type: boolean + default: false # For the iOS build command project_type: description: If the iOS app is built using a project file (*.xcodeproj) or a workspace. @@ -65,6 +69,10 @@ steps: - ios_simulator_start: device: <> - yarn_install + - when: + condition: <> + steps: + - metro_start - ios_build: project_path: <> derived_data_path: <>