Skip to content

Commit

Permalink
feat(flavor, filterFile): flavor and filterFile args were supported
Browse files Browse the repository at this point in the history
  • Loading branch information
matzuk committed Jan 3, 2024
1 parent 71c1a16 commit ceaa6b5
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 14 deletions.
24 changes: 13 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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. <br>**Android**: `application` should point to the APK file. <br>**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` <br>**iOS**: `/home/user/workspace/sample.zip` or `/home/user/workspace/sample.ipa` |
| `testApplication` (required) | Test application binary path. <br>**Android**: `test_application` should point to the test .apk file for your app. <br>**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` <br>**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. <br>**Android**: `application` should point to the APK file. <br>**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` <br>**iOS**: `/home/user/workspace/sample.zip` or `/home/user/workspace/sample.ipa` |
| `testApplication` (required) | Test application binary path. <br>**Android**: `test_application` should point to the test .apk file for your app. <br>**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` <br>**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

Expand Down
6 changes: 6 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
12 changes: 10 additions & 2 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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);
}
Expand Down Expand Up @@ -4208,4 +4216,4 @@ module.exports = require("util");
/******/ module.exports = __webpack_exports__;
/******/
/******/ })()
;
;
12 changes: 11 additions & 1 deletion src/run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit ceaa6b5

Please sign in to comment.