|
--- |
|
format_version: '6' |
|
default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git |
|
project_type: android |
|
trigger_map: |
|
- push_branch: "*" |
|
workflow: primary |
|
- pull_request_source_branch: "*" |
|
workflow: primary |
|
workflows: |
|
primary: |
|
steps: |
|
- [email protected]: |
|
run_if: '{{getenv "SSH_RSA_PRIVATE_KEY" | ne ""}}' |
|
- [email protected]: {} |
|
- [email protected]: {} |
|
- [email protected]: |
|
inputs: |
|
- gradlew_path: "$PROJECT_LOCATION/gradlew" |
|
- [email protected]: |
|
inputs: |
|
- project_location: "$PROJECT_LOCATION" |
|
- module: "$MODULE" |
|
- variant: "$TEST_VARIANT" |
|
- [email protected]: |
|
inputs: |
|
- project_location: "$PROJECT_LOCATION" |
|
- module: "$MODULE" |
|
- variant: "$TEST_VARIANT" |
|
- [email protected]: |
|
inputs: |
|
- gradlew_path: "./gradlew" |
|
- gradle_task: assembleDebug assembleDebugAndroidTest |
|
- [email protected]: |
|
inputs: |
|
- content: |- |
|
#!/usr/bin/env bash |
|
# fail if any commands fails |
|
set -e |
|
# debug log |
|
set -x |
|
|
|
echo "$SERVICE_ACCOUNT_KEY_JSON" > $HOME/.config/gcloud/application_default_credentials.json |
|
title: Save Google Service Account JSON |
|
- [email protected]: |
|
title: Generate Flank config |
|
inputs: |
|
- content: | |
|
#!/usr/bin/env bash |
|
# fail if any commands fails |
|
set -e |
|
# debug log |
|
set -x |
|
|
|
|
|
cat << FLANKEOF > ./flank.yml |
|
# gcloud args match the official gcloud cli |
|
# https://cloud.google.com/sdk/gcloud/reference/firebase/test/android/run |
|
gcloud: |
|
# results-bucket: tmp_flank |
|
record-video: true |
|
timeout: 30m |
|
async: false |
|
# project: delta-essence-114723 |
|
# results-history-name: android-history |
|
|
|
# test and app are the only required args |
|
app: $BITRISE_APK_PATH |
|
test: $BITRISE_TEST_APK_PATH |
|
auto-google-login: true |
|
use-orchestrator: true |
|
environment-variables: |
|
clearPackageData: true |
|
directories-to-pull: |
|
- /sdcard/screenshots |
|
performance-metrics: true |
|
device: |
|
- model: NexusLowRes |
|
version: 28 |
|
|
|
flank: |
|
# test shards - the amount of groups to split the test suite into |
|
# set to -1 to use one shard per test. |
|
testShards: 1 |
|
# repeat tests - the amount of times to run the tests. |
|
# 1 runs the tests once. 10 runs all the tests 10x |
|
repeatTests: 1 |
|
# always run - these tests are inserted at the beginning of every shard |
|
# useful if you need to grant permissions or login before other tests run |
|
# test-targets-always-run: |
|
# - class com.example.app.ExampleUiTest#testPasses |
|
FLANKEOF |
|
- [email protected]: |
|
inputs: |
|
- content: |- |
|
#!/usr/bin/env bash |
|
# fail if any commands fails |
|
set -e |
|
# debug log |
|
set -x |
|
|
|
wget --quiet https://github.com/TestArmada/flank/releases/download/flank_snapshot/flank.jar -O /usr/local/bin/flank.jar |
|
java -jar /usr/local/bin/flank.jar firebase test android run |
|
title: Run Flank |
|
- [email protected]: {} |
|
- [email protected]: {} |
|
app: |
|
envs: |
|
- opts: |
|
is_expand: false |
|
PROJECT_LOCATION: "." |
|
- opts: |
|
is_expand: false |
|
MODULE: app |
|
- opts: |
|
is_expand: false |
|
BUILD_VARIANT: Debug |
|
- opts: |
|
is_expand: false |
|
TEST_VARIANT: Debug |