Skip to content

Commit

Permalink
Use mango-docker images in README and example (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
JoeSSS committed Aug 18, 2018
1 parent 5422368 commit 390881d
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 7 deletions.
27 changes: 22 additions & 5 deletions README.md
Expand Up @@ -31,16 +31,33 @@ fastlane add_plugin mango

After installing this plugin you have access to one additional action (`mango`) in your `Fastfile`.

So a lane in your `Fastfile` could look similar to this:
So a lane in your `Fastfile` could look similar to this for Espresso tests:
```ruby
desc "Run espresso tests on docker images"
lane :Espresso_Tests do |options|
mango(
lane :Espresso_Tests do
run_dockerized_task(
container_name: "espresso_container",
docker_image: "thyrlian/android-sdk:latest",
port_factor: options[:port_factor],
docker_image: "joesss/mango-docker:latest",
container_timeout: 120,
android_task: "./gradlew connectedAndroidTest",
post_actions: "adb logcat -d > logcat.txt"
post_actions: "adb logcat -d > logcat.txt",
pull_latest_image: true
)
end
```

or to this for unit tests or other gradle tasks:
```ruby
desc "Run unit tests on docker images"
lane :Unit_Tests do
run_dockerized_task(
container_name: "unit_tests_container",
port_factor: options[:port_factor],
docker_image: "joesss/mango-base:latest",
is_running_on_emulator: false,
android_task: "./gradlew testDebug",
pull_latest_image: true
)
end
```
Expand Down
Expand Up @@ -114,7 +114,7 @@ def self.available_options
FastlaneCore::ConfigItem.new(key: :workspace_dir,
env_name: "WORKSPACE_DIR",
default_value: '/root/tests/',
description: "Path to the workspace to execute commands. Needed when your tests are inside the mounted repo (e.g. if your tests are in /appiumTests/ folder you will use /root/tests/appiumTests)",
description: "Path to the workspace to execute commands. If you want to execute your `android_task` from a different directory you have to specify `workspace_dir`.",
optional: true,
type: String),

Expand Down
2 changes: 1 addition & 1 deletion sample-android/fastlane/Fastfile
Expand Up @@ -19,7 +19,7 @@ platform :android do
desc 'Run unit tests using the mango plugin'
lane :unit_tests do
run_dockerized_task(
docker_image: 'thyrlian/android-sdk:latest',
docker_image: 'joesss/mango-base:latest',
android_task: './gradlew testDebug',
is_running_on_emulator: false,
pull_latest_image: true
Expand Down

0 comments on commit 390881d

Please sign in to comment.