Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add adp pull parameter #68

Merged
merged 2 commits into from
Feb 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 >>