From ed4e5d31e6e3157e8f58ca9101e087a1f4c192df Mon Sep 17 00:00:00 2001 From: Evgenii Matsiuk Date: Mon, 26 Jun 2023 13:23:14 +0400 Subject: [PATCH 1/3] ios support --- .circleci/test-deploy.yml | 1 + src/commands/run_tests.yml | 9 +++++++-- .../{example.yml => example_android.yml} | 1 + src/examples/example_ios.yaml | 19 +++++++++++++++++++ src/executors/default.yml | 2 +- src/scripts/run-tests.sh | 2 +- 6 files changed, 30 insertions(+), 4 deletions(-) rename src/examples/{example.yml => example_android.yml} (95%) create mode 100644 src/examples/example_ios.yaml diff --git a/.circleci/test-deploy.yml b/.circleci/test-deploy.yml index ba7e027..973840c 100644 --- a/.circleci/test-deploy.yml +++ b/.circleci/test-deploy.yml @@ -35,6 +35,7 @@ jobs: # apiKeyEnvVar: MARATHON_CLOUD_API_TOKEN # application: app.apk # testApplication: appTest.apk + # platform: Android print-help-test: executor: marathon-cloud-orb/default steps: diff --git a/src/commands/run_tests.yml b/src/commands/run_tests.yml index 395547d..a581541 100755 --- a/src/commands/run_tests.yml +++ b/src/commands/run_tests.yml @@ -8,11 +8,15 @@ parameters: application: type: string description: > - Application binary path, e.g. apk file for Android + Application binary path, e.g. apk file for Android or zip file of iOS Application testApplication: type: string description: > - Test application binary path, e.g. apk file for Android + Test application binary path, e.g. apk file for Android or zip file of iOS Test Runner app + platform: + type: string + description: > + Testing platform. Android or iOS only output: type: string default: "marathon" @@ -24,5 +28,6 @@ steps: ORB_API_KEY_ENV_VAR: <> ORB_APPLICATION: <> ORB_TEST_APPLICATION: <> + ORB_PLATFORM: <> ORB_OUTPUT: <> command: <> diff --git a/src/examples/example.yml b/src/examples/example_android.yml similarity index 95% rename from src/examples/example.yml rename to src/examples/example_android.yml index 15c799e..680de43 100755 --- a/src/examples/example.yml +++ b/src/examples/example_android.yml @@ -12,6 +12,7 @@ usage: apiKeyEnvVar: MARATHON_CLOUD_API_TOKEN # don't forget to add a token application: app/build/outputs/apk/debug/app-debug.apk testApplication: app/build/outputs/apk/androidTest/debug/app-debug-androidTest.apk + platform: Android workflows: marathon-cloud-orb-example: jobs: diff --git a/src/examples/example_ios.yaml b/src/examples/example_ios.yaml new file mode 100644 index 0000000..4f1be96 --- /dev/null +++ b/src/examples/example_ios.yaml @@ -0,0 +1,19 @@ +description: > + Run a job inside the marathon-cloud cli container, via this orb's executor. +usage: + version: 2.1 + orbs: + marathon-cloud: marathonlabs/marathon-cloud-orb@x.y.z + jobs: + run-tests-using-marathon-cloud: + executor: marathon-cloud/default + steps: + - marathon-cloud/run_tests: + apiKeyEnvVar: MARATHON_CLOUD_API_TOKEN # don't forget to add a token + application: /home/user/workspace/sample.zip + testApplication: /home/user/workspace/sampleUITests-Runner.zip + platform: iOS + workflows: + marathon-cloud-orb-example: + jobs: + - run-tests-using-marathon-cloud \ No newline at end of file diff --git a/src/executors/default.yml b/src/executors/default.yml index 06425b0..dba1985 100755 --- a/src/executors/default.yml +++ b/src/executors/default.yml @@ -4,7 +4,7 @@ docker: - image: 'marathonlabs/marathon-cloud:<>' parameters: tag: - default: 0.1.2 + default: 0.2.0 description: > Pick a specific marathonlabs/marathon-cloud image variant: https://hub.docker.com/r/marathonlabs/marathon-cloud/tags diff --git a/src/scripts/run-tests.sh b/src/scripts/run-tests.sh index 515914b..7977a6a 100644 --- a/src/scripts/run-tests.sh +++ b/src/scripts/run-tests.sh @@ -2,4 +2,4 @@ API_KEY=$(eval echo \$"$ORB_API_KEY_ENV_VAR") -marathon-cloud -api-key "$API_KEY" -apk "$ORB_APPLICATION" -testapk "$ORB_TEST_APPLICATION" -o "$ORB_OUTPUT" +marathon-cloud -api-key "$API_KEY" -app "$ORB_APPLICATION" -testapp "$ORB_TEST_APPLICATION" -o "$ORB_OUTPUT" -platform "$ORB_PLATFORM" From 7d9f3ffa06d5eca39bec6c9196da4e46268393ab Mon Sep 17 00:00:00 2001 From: Evgenii Matsiuk Date: Mon, 26 Jun 2023 13:36:26 +0400 Subject: [PATCH 2/3] lint fixes --- src/commands/run_tests.yml | 2 +- src/examples/example_android.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/commands/run_tests.yml b/src/commands/run_tests.yml index a581541..f2058e6 100755 --- a/src/commands/run_tests.yml +++ b/src/commands/run_tests.yml @@ -16,7 +16,7 @@ parameters: platform: type: string description: > - Testing platform. Android or iOS only + Testing platform. Android or iOS only output: type: string default: "marathon" diff --git a/src/examples/example_android.yml b/src/examples/example_android.yml index 680de43..b986bdc 100755 --- a/src/examples/example_android.yml +++ b/src/examples/example_android.yml @@ -16,4 +16,4 @@ usage: workflows: marathon-cloud-orb-example: jobs: - - run-tests-using-marathon-cloud + - run-tests-using-marathon-cloud \ No newline at end of file From e76e7c97d9c2cba5b03d256a50fd96510d3f8c85 Mon Sep 17 00:00:00 2001 From: Evgenii Matsiuk Date: Mon, 26 Jun 2023 13:37:51 +0400 Subject: [PATCH 3/3] lint fixes 2 --- src/examples/example_android.yml | 2 +- src/examples/example_ios.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/examples/example_android.yml b/src/examples/example_android.yml index b986bdc..680de43 100755 --- a/src/examples/example_android.yml +++ b/src/examples/example_android.yml @@ -16,4 +16,4 @@ usage: workflows: marathon-cloud-orb-example: jobs: - - run-tests-using-marathon-cloud \ No newline at end of file + - run-tests-using-marathon-cloud diff --git a/src/examples/example_ios.yaml b/src/examples/example_ios.yaml index 4f1be96..cc055c3 100644 --- a/src/examples/example_ios.yaml +++ b/src/examples/example_ios.yaml @@ -16,4 +16,4 @@ usage: workflows: marathon-cloud-orb-example: jobs: - - run-tests-using-marathon-cloud \ No newline at end of file + - run-tests-using-marathon-cloud