Skip to content

Commit

Permalink
feat: add adp pull parameter (#68)
Browse files Browse the repository at this point in the history
* feat: add adb pull parameter
  • Loading branch information
ryanbourdais authored Feb 27, 2023
1 parent c03bdca commit 8f3bbd5
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .circleci/test-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,9 @@ jobs:
run-tests-working-directory: ./compose-samples/Jetchat
post-run-tests-steps:
- android/save-build-cache
pull-data: true
pull-data-path: storage
pull-data-target: "."

test-fastlane:
docker:
Expand Down
19 changes: 19 additions & 0 deletions src/commands/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,21 @@ parameters:
description: Use this to configure the no_output_timeout value
type: string
default: 10m
pull-data:
description: |
Whether to pull data after running tests
type: boolean
default: false
pull-data-path:
description: |
Emulator directory to pull data from
type: string
default: data
pull-data-target:
description: |
Location to save pulled data
type: string
default: "."
steps:
- run:
environment:
Expand All @@ -35,3 +50,7 @@ steps:
name: Run tests with max tries of <<parameters.max-tries>>
working_directory: <<parameters.working-directory>>
command: <<include(scripts/run-tests.sh)>>
- when:
condition: << parameters.pull-data >>
steps:
- run: adb pull << parameters.pull-data-path >> << parameters.pull-data-target >>
18 changes: 18 additions & 0 deletions src/commands/start-emulator-and-run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,21 @@ parameters:
Whether to kill the emulators after the tests complete
type: boolean
default: true
pull-data:
description: |
Whether to pull data after running tests
type: boolean
default: false
pull-data-path:
description: |
Emulator directory to pull data from
type: string
default: data
pull-data-target:
description: |
Location to save pulled data
type: string
default: "."

steps:
- create-avd:
Expand Down Expand Up @@ -223,6 +238,9 @@ steps:
max-tries: << parameters.max-tries >>
retry-interval: << parameters.retry-interval >>
no-output-timeout: << parameters.no-output-timeout >>
pull-data: << parameters.pull-data >>
pull-data-path: << parameters.pull-data-path >>
pull-data-target: << parameters.pull-data-target >>
- << parameters.post-run-tests-steps >>
- when:
condition: << parameters.save-gradle-cache >>
Expand Down
19 changes: 19 additions & 0 deletions src/jobs/run-ui-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,22 @@ parameters:
Whether to kill the emulators after the tests complete
type: boolean
default: true
pull-data:
description: |
Whether to pull data after running tests
type: boolean
default: false
pull-data-path:
description: |
Emulator directory to pull data from
type: string
default: data
pull-data-target:
description: |
Location to save pulled data
type: string
default: "."

executor: << parameters.executor >>
steps:
- when:
Expand Down Expand Up @@ -233,3 +249,6 @@ steps:
retry-interval: << parameters.retry-interval >>
no-output-timeout: << parameters.no-output-timeout >>
kill-emulators: << parameters.kill-emulators >>
pull-data: << parameters.pull-data >>
pull-data-path: << parameters.pull-data-path >>
pull-data-target: << parameters.pull-data-target >>

0 comments on commit 8f3bbd5

Please sign in to comment.