Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ This action wraps [marathon-cloud][] CLI in your GitHub Actions workflow.
| `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 | `` | `` |

## Usage Examples

Expand Down
3 changes: 3 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ inputs:
branch:
description: "Branch for run, for example it could be git branch like develop or feature/about-screen"
required: false
project:
description: "The unique identifier (slug) for the project"
required: false
branding:
icon: "play"
color: "purple"
Expand Down
15 changes: 11 additions & 4 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3986,7 +3986,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.buildDownloadArgs = exports.buildiOSArgs = exports.buildAndroidArgs = void 0;
const core = __importStar(__nccwpck_require__(186));
function buildAndroidArgs(apiKey, application, testApplication, link, osVersion, systemImage, isolated, flavor, filterFile, wait, name, device, xcodeVersion, xctestplanFilterFile, xctestplanTargetName, xctestrunEnv, xctestrunTestEnv, ignoreTestFailures, resultFile, pullFiles, branch) {
function buildAndroidArgs(apiKey, application, testApplication, link, osVersion, systemImage, isolated, flavor, filterFile, wait, name, device, xcodeVersion, xctestplanFilterFile, xctestplanTargetName, xctestrunEnv, xctestrunTestEnv, ignoreTestFailures, resultFile, pullFiles, branch, project) {
const args = [
"run",
"android",
Expand Down Expand Up @@ -4052,10 +4052,13 @@ function buildAndroidArgs(apiKey, application, testApplication, link, osVersion,
if (branch) {
args.push("--branch", branch);
}
if (project) {
args.push("--project", project);
}
return args;
}
exports.buildAndroidArgs = buildAndroidArgs;
function buildiOSArgs(apiKey, application, testApplication, link, osVersion, systemImage, isolated, flavor, filterFile, wait, name, device, xcodeVersion, xctestplanFilterFile, xctestplanTargetName, xctestrunEnv, xctestrunTestEnv, ignoreTestFailures, resultFile, pullFiles, branch) {
function buildiOSArgs(apiKey, application, testApplication, link, osVersion, systemImage, isolated, flavor, filterFile, wait, name, device, xcodeVersion, xctestplanFilterFile, xctestplanTargetName, xctestrunEnv, xctestrunTestEnv, ignoreTestFailures, resultFile, pullFiles, branch, project) {
const args = [
"run",
"ios",
Expand Down Expand Up @@ -4123,6 +4126,9 @@ function buildiOSArgs(apiKey, application, testApplication, link, osVersion, sys
if (branch) {
args.push("--branch", branch);
}
if (project) {
args.push("--project", project);
}
return args;
}
exports.buildiOSArgs = buildiOSArgs;
Expand Down Expand Up @@ -4216,15 +4222,16 @@ function main() {
const resultFile = core.getInput("resultFile") || "result.json";
const pullFiles = core.getInput("pullFiles");
const branch = core.getInput("branch");
const project = core.getInput("project");
let args = [];
const lowercasePlatform = platform.toLowerCase();
switch (lowercasePlatform) {
case "android": {
args = (0, command_1.buildAndroidArgs)(apiKey, application, testApplication, link, osVersion, systemImage, isolated, flavor, filterFile, wait, name, device, xcodeVersion, xctestplanFilterFile, xctestplanTargetName, xctestrunEnv, xctestrunTestEnv, "", resultFile, pullFiles, branch);
args = (0, command_1.buildAndroidArgs)(apiKey, application, testApplication, link, osVersion, systemImage, isolated, flavor, filterFile, wait, name, device, xcodeVersion, xctestplanFilterFile, xctestplanTargetName, xctestrunEnv, xctestrunTestEnv, "", resultFile, pullFiles, branch, project);
break;
}
case "ios": {
args = (0, command_1.buildiOSArgs)(apiKey, application, testApplication, link, osVersion, systemImage, isolated, flavor, filterFile, wait, name, device, xcodeVersion, xctestplanFilterFile, xctestplanTargetName, xctestrunEnv, xctestrunTestEnv, "", resultFile, pullFiles, branch);
args = (0, command_1.buildiOSArgs)(apiKey, application, testApplication, link, osVersion, systemImage, isolated, flavor, filterFile, wait, name, device, xcodeVersion, xctestplanFilterFile, xctestplanTargetName, xctestrunEnv, xctestrunTestEnv, "", resultFile, pullFiles, branch, project);
break;
}
default: {
Expand Down
10 changes: 10 additions & 0 deletions src/command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export function buildAndroidArgs(
resultFile: string,
pullFiles: string,
branch: string,
project: string,
): string[] {
const args = [
"run",
Expand Down Expand Up @@ -106,6 +107,10 @@ export function buildAndroidArgs(
args.push("--branch", branch);
}

if (project) {
args.push("--project", project);
}

return args;
}

Expand All @@ -131,6 +136,7 @@ export function buildiOSArgs(
resultFile: string,
pullFiles: string,
branch: string,
project: string,
): string[] {
const args = [
"run",
Expand Down Expand Up @@ -221,6 +227,10 @@ export function buildiOSArgs(
args.push("--branch", branch);
}

if (project) {
args.push("--project", project);
}

return args;
}

Expand Down
3 changes: 3 additions & 0 deletions src/run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ async function main() {
const resultFile = core.getInput("resultFile") || "result.json";
const pullFiles = core.getInput("pullFiles");
const branch = core.getInput("branch");
const project = core.getInput("project");

let args: string[] = [];

Expand Down Expand Up @@ -58,6 +59,7 @@ async function main() {
resultFile,
pullFiles,
branch,
project,
);
break;
}
Expand All @@ -84,6 +86,7 @@ async function main() {
resultFile,
pullFiles,
branch,
project,
);
break;
}
Expand Down
Loading