From ceaa6b554d3dc619c8b8f1d72658657ef15e3279 Mon Sep 17 00:00:00 2001 From: Evgenii Matsiuk Date: Wed, 3 Jan 2024 14:01:46 +0300 Subject: [PATCH] feat(flavor, filterFile): flavor and filterFile args were supported --- README.md | 24 +++++++++++++----------- action.yml | 6 ++++++ lib/index.js | 12 ++++++++++-- src/run.ts | 12 +++++++++++- 4 files changed, 40 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 21272fc..e90e530 100644 --- a/README.md +++ b/README.md @@ -4,17 +4,19 @@ This action wraps [marathon-cloud][] CLI in your GitHub Actions workflow. ## Action Inputs -| Name | Description | Default | Example | -| :--------------------------: | ------------------------- |---------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| `apiKey` (required) | Marathon Cloud API key | `` | `cafebabe` | -| `application` (required) | Application binary path.
**Android**: `application` should point to the APK file.
**iOS**: `application` should point to an ARM compatible Simulator build packaged in an ipa format or a zip archive. | | **Android**: `app/build/outputs/apk/debug/app-debug.apk`
**iOS**: `/home/user/workspace/sample.zip` or `/home/user/workspace/sample.ipa` | -| `testApplication` (required) | Test application binary path.
**Android**: `test_application` should point to the test .apk file for your app.
**iOS**: `test_application` should point to an ARM compatible iOS Test Runner app packaged in an ipa format or a zip archive. | | **Android**: `app/build/outputs/apk/androidTest/debug/app-debug-androidTest.apk`
**iOS**: `/home/user/workspace/sampleUITests-Runner.zip` or `/home/user/workspace/sampleUITests-Runner.ipa` | -| `platform` (required) | Testing platform | `` | `Android` or `iOS` | -| `osVersion` (optional) | Android or iOS OS version | `` | `11`, `15.5`, etc. | -| `systemImage` (optional) | OS-specific system image | `` | `default`, `google_apis`, etc. | -| `output` (optional) | Output folder path | `` | `` | -| `link` (optional) | Link to commit | `` | `` | -| `isolated` (optional) | Run each test in isolation, i.e. isolated batching | `` | `` | +| Name | Description | Default | Example | +| :--------------------------: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `apiKey` (required) | Marathon Cloud API key | `` | `cafebabe` | +| `application` (required) | Application binary path.
**Android**: `application` should point to the APK file.
**iOS**: `application` should point to an ARM compatible Simulator build packaged in an ipa format or a zip archive. | | **Android**: `app/build/outputs/apk/debug/app-debug.apk`
**iOS**: `/home/user/workspace/sample.zip` or `/home/user/workspace/sample.ipa` | +| `testApplication` (required) | Test application binary path.
**Android**: `test_application` should point to the test .apk file for your app.
**iOS**: `test_application` should point to an ARM compatible iOS Test Runner app packaged in an ipa format or a zip archive. | | **Android**: `app/build/outputs/apk/androidTest/debug/app-debug-androidTest.apk`
**iOS**: `/home/user/workspace/sampleUITests-Runner.zip` or `/home/user/workspace/sampleUITests-Runner.ipa` | +| `platform` (required) | Testing platform | `` | `Android` or `iOS` | +| `osVersion` (optional) | Android or iOS OS version | `` | `11`, `15.5`, etc. | +| `systemImage` (optional) | OS-specific system image | `` | `default`, `google_apis`, etc. | +| `output` (optional) | Output folder path | `` | `` | +| `link` (optional) | Link to commit | `` | `` | +| `isolated` (optional) | Run each test in isolation, i.e. isolated batching | `` | `` | +| `flavor` (optional) | Type of tests to run | `` | `native`, `js-test-appium`, `python-robotframework-appium` | +| `filterFile` (optional) | File containing test filters in YAML format, following the schema described at https://docs.marathonlabs.io/runner/configuration/filtering/#filtering-logic. For iOS see also https://docs.marathonlabs.io/runner/next/ios#test-plans. | `` | `` | ## Usage Examples diff --git a/action.yml b/action.yml index d3085a7..1804c72 100644 --- a/action.yml +++ b/action.yml @@ -29,6 +29,12 @@ inputs: isolated: description: "Run each test in isolation, i.e. isolated batching" required: false + flavor: + description: "Type of tests to run. Default: [native]. Possible values: [native, js-test-appium, python-robotframework-appium]" + required: false + filterFile: + description: "File containing test filters in YAML format, following the schema described at https://docs.marathonlabs.io/runner/configuration/filtering/#filtering-logic. For iOS see also https://docs.marathonlabs.io/runner/next/ios#test-plans." + required: false branding: icon: "play" color: "purple" diff --git a/lib/index.js b/lib/index.js index 91f7768..5977494 100644 --- a/lib/index.js +++ b/lib/index.js @@ -4007,6 +4007,8 @@ function main() { const osVersion = core.getInput("osVersion"); const systemImage = core.getInput("systemImage"); const isolated = core.getInput("isolated"); + const flavor = core.getInput("flavor"); + const filterFile = core.getInput("filterFile"); const args = [ "-api-key", apiKey, @@ -4030,7 +4032,13 @@ function main() { args.push("-system-image", systemImage); } if (isolated) { - args.push("-isolated", systemImage); + args.push("-isolated", isolated); + } + if (flavor) { + args.push("-flavor", flavor); + } + if (filterFile) { + args.push("-filter-file", filterFile); } yield (0, exec_1.exec)("marathon-cloud", args); } @@ -4208,4 +4216,4 @@ module.exports = require("util"); /******/ module.exports = __webpack_exports__; /******/ /******/ })() -; \ No newline at end of file +; diff --git a/src/run.ts b/src/run.ts index b298e16..78db0c6 100644 --- a/src/run.ts +++ b/src/run.ts @@ -12,6 +12,8 @@ async function main() { const osVersion = core.getInput("osVersion"); const systemImage = core.getInput("systemImage"); const isolated = core.getInput("isolated"); + const flavor = core.getInput("flavor"); + const filterFile = core.getInput("filterFile"); const args = [ "-api-key", @@ -41,7 +43,15 @@ async function main() { } if (isolated) { - args.push("-isolated", systemImage); + args.push("-isolated", isolated); + } + + if (flavor) { + args.push("-flavor", flavor); + } + + if (filterFile) { + args.push("-filter-file", filterFile); } await exec("marathon-cloud", args);