Skip to content

Commit

Permalink
feat: Allow the metro packager to be started from the test jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
matt-oakes committed May 14, 2019
1 parent 0406f20 commit 68846df
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/jobs/android_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'.
Expand Down Expand Up @@ -41,6 +45,10 @@ steps:
at: <<parameters.workspace_root>>
- setup_macos_executor
- yarn_install
- when:
condition: <<parameters.start_metro>>
steps:
- metro_start
- android_emulator_start:
device_name: <<parameters.device_name>>
platform_version: <<parameters.platform_version>>
Expand Down
8 changes: 8 additions & 0 deletions src/jobs/ios_build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -65,6 +69,10 @@ steps:
- ios_simulator_start:
device: <<parameters.device>>
- yarn_install
- when:
condition: <<parameters.start_metro>>
steps:
- metro_start
- ios_build:
project_path: <<parameters.project_path>>
derived_data_path: <<parameters.derived_data_path>>
Expand Down

0 comments on commit 68846df

Please sign in to comment.