From 1159921cfaf82fc9735424f330f0eeaa7571617c Mon Sep 17 00:00:00 2001 From: Evgenii Matsiuk Date: Tue, 17 Dec 2024 13:20:40 +0300 Subject: [PATCH] feat: granted_permission was added (#25) --- README.md | 57 +++++++++++++++++++++++++++-------------------------- action.yaml | 6 +++++- 2 files changed, 34 insertions(+), 29 deletions(-) diff --git a/README.md b/README.md index dd3ffcc..8a56124 100644 --- a/README.md +++ b/README.md @@ -32,34 +32,35 @@ jobs: ## Inputs -| Name | Description | Default | Example | -| :-------------------------------: | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `apiKey` (required) | Marathon Cloud API key | | `cafebabe` | -| `version` (required) | marathon-cloud cli version to use | | `1.0.0` | -| `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. For Android one of [10, 11, 12, 13, 14]. For iOS one of [16.4, 17.2] | **Android**: `11`; **iOS**: `16.4` | `12`, `17.2`, etc. | -| `systemImage` (optional) | OS-specific system image. For Android only | `` | `default`, `google_apis`, etc. | -| `output` (optional) | Output folder for test run results | `` | `output` | -| `outputGlob` (optional) | Only files matching this glob will be downloaded, i.e. 'tests/\*\*' will download only the JUnit xml files | `` | `tests/**` | -| `link` (optional) | Link to commit | `` | `` | -| `isolated` (optional) | Run each test in isolation, i.e. isolated batching | `false` | `true`, `false` | -| `flavor` (optional) | Type of tests to run | `native` | `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. | `` | `` | -| `wait` (optional) | Wait for test run to finish if true, exits after triggering a run if false. | `` | `true` | -| `name` (optional) | Name for run, for example it could be description of commit. | `` | AmazingRun | -| `device` (optional) | Device type. For Android one of [phone, tv, watch]. For iOS one of [iPhone-14, iPhone-15] | **Android**: `phone`; **iOS**: `iPhone-14` | `phone`, `tv`, `watch`, `iPhone-14`, `iPhone-15` | -| `xcodeVersion` (optional) | Xcode version. Only for iOS. Possible values: [14.3.1, 15.2] | `14.3.1` | `14.3.1`, `15.2` | -| `xctestplanFilterFile` (optional) | Test filters supplied as .xctestplan file | `` | `` | -| `xctestplanTargetName` (optional) | Target name to use for test filtering in .xctestplan | `` | `` | -| `xctestrunEnv` (optional) | Xctestrun environment variables, format: 'VAR1=VALUE1,VAR2=VALUE2' | `` | `VAR1=VALUE1,VAR2=VALUE2` | -| `xctestrunTestEnv` (optional) | Xctestrun testing environment variables, format: 'VAR1=VALUE1,VAR2=VALUE2' | `` | `VAR1=VALUE1,VAR2=VALUE2` | -| `ignoreTestFailures` (optional) | When tests fail and this option is true then GHA will exit with code 0. By default, GHA will exit with code 1 in case of test failures and 0 for passing tests [possible values: true, false] | `false` | `true`, `false` | -| `pullFiles` (optional) | Pull files from devices after the test run. The format is `ROOT1:PATH1,ROOT2:PATH2` where ROOT is one of [EXTERNAL_STORAGE, APP_DATA] and PATH is a relative path to the target file or directory. Note: Files with the same name and path from different devices may overwrite each other. | `` | `EXTERNAL_STORAGE:Documents/some-results,APP_DATA:files/my_folder/some_file.txt` | -| `resultFile` (optional) | Result file path in a machine-readable format. You can specify the format via extension [yaml,json] | `result.json` | `some_result.json` | -| `branch` (optional) | Branch for run, for example it could be git branch like develop or feature/about-screen | `` | `develop` | -| `project` (optional) | The unique identifier (slug) for the project | `` | `` | +| Name | Description | Default | Example | +| :-------------------------------: | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `apiKey` (required) | Marathon Cloud API key | | `cafebabe` | +| `version` (required) | marathon-cloud cli version to use | | `1.0.0` | +| `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. For Android one of [10, 11, 12, 13, 14]. For iOS one of [16.4, 17.2] | **Android**: `11`; **iOS**: `16.4` | `12`, `17.2`, etc. | +| `systemImage` (optional) | OS-specific system image. For Android only | `` | `default`, `google_apis`, etc. | +| `output` (optional) | Output folder for test run results | `` | `output` | +| `outputGlob` (optional) | Only files matching this glob will be downloaded, i.e. 'tests/\*\*' will download only the JUnit xml files | `` | `tests/**` | +| `link` (optional) | Link to commit | `` | `` | +| `isolated` (optional) | Run each test in isolation, i.e. isolated batching | `false` | `true`, `false` | +| `flavor` (optional) | Type of tests to run | `native` | `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. | `` | `` | +| `wait` (optional) | Wait for test run to finish if true, exits after triggering a run if false. | `` | `true` | +| `name` (optional) | Name for run, for example it could be description of commit. | `` | AmazingRun | +| `device` (optional) | Device type. For Android one of [phone, tv, watch]. For iOS one of [iPhone-14, iPhone-15] | **Android**: `phone`; **iOS**: `iPhone-14` | `phone`, `tv`, `watch`, `iPhone-14`, `iPhone-15` | +| `xcodeVersion` (optional) | Xcode version. Only for iOS. Possible values: [14.3.1, 15.2] | `14.3.1` | `14.3.1`, `15.2` | +| `xctestplanFilterFile` (optional) | Test filters supplied as .xctestplan file | `` | `` | +| `xctestplanTargetName` (optional) | Target name to use for test filtering in .xctestplan | `` | `` | +| `xctestrunEnv` (optional) | Xctestrun environment variables, format: 'VAR1=VALUE1,VAR2=VALUE2' | `` | `VAR1=VALUE1,VAR2=VALUE2` | +| `xctestrunTestEnv` (optional) | Xctestrun testing environment variables, format: 'VAR1=VALUE1,VAR2=VALUE2' | `` | `VAR1=VALUE1,VAR2=VALUE2` | +| `ignoreTestFailures` (optional) | When tests fail and this option is true then GHA will exit with code 0. By default, GHA will exit with code 1 in case of test failures and 0 for passing tests [possible values: true, false] | `false` | `true`, `false` | +| `pullFiles` (optional) | Pull files from devices after the test run. The format is `ROOT1:PATH1,ROOT2:PATH2` where ROOT is one of [EXTERNAL_STORAGE, APP_DATA] and PATH is a relative path to the target file or directory. Note: Files with the same name and path from different devices may overwrite each other. | `` | `EXTERNAL_STORAGE:Documents/some-results,APP_DATA:files/my_folder/some_file.txt` | +| `resultFile` (optional) | Result file path in a machine-readable format. You can specify the format via extension [yaml,json] | `result.json` | `some_result.json` | +| `branch` (optional) | Branch for run, for example it could be git branch like develop or feature/about-screen | `` | `develop` | +| `project` (optional) | The unique identifier (slug) for the project | `` | `` | +| `grantedPermission` (optional) | Grant permission to application. Important: Granting is conducted before each test batch (not each test). If you need to grant before each test, please use --isolated mode. Available permissions: calendar, contacts-limited, contacts, location, location-always, photos-add, photos, media-library, microphone, motion, reminders, siri | `` | `motion,siri,calendar` | ## marathon-cloud version diff --git a/action.yaml b/action.yaml index 51cb455..f6c69f3 100644 --- a/action.yaml +++ b/action.yaml @@ -79,6 +79,9 @@ inputs: project: description: "The unique identifier (slug) for the project" required: false + grantedPermission: + description: "Grant permission to application. Important: Granting is conducted before each test batch (not each test). If you need to grant before each test, please use --isolated mode. Available permissions: calendar, contacts-limited, contacts, location, location-always, photos-add, photos, media-library, microphone, motion, reminders, siri. Format: 'motion,siri'" + required: false branding: color: purple icon: play-circle @@ -90,7 +93,7 @@ runs: with: version: ${{ inputs.version }} - name: Run tests using marathon-cloud - uses: MarathonLabs/action-invoke@1.0.11 + uses: MarathonLabs/action-invoke@1.0.12 with: apiKey: ${{ inputs.apiKey }} application: ${{ inputs.application }} @@ -117,3 +120,4 @@ runs: resultFile: ${{ inputs.resultFile }} branch: ${{ inputs.branch }} project: ${{ inputs.project }} + grantedPermission: ${{ inputs.grantedPermission }}