Support Xcode specificed parameters

This commit is contained in:
Wipoo Shinsirikul
2020-12-05 20:31:36 +07:00
parent d9b5cc1d8b
commit c047d5942e
2 changed files with 16 additions and 0 deletions

View File

@@ -47,6 +47,8 @@ Codecov's Action currently supports five inputs from the user: `token`, `file`,
| `fail_ci_if_error` | Specify if CI pipeline should fail when Codecov runs into errors during upload. *Defaults to **false*** | Optional | `fail_ci_if_error` | Specify if CI pipeline should fail when Codecov runs into errors during upload. *Defaults to **false*** | Optional
| `path_to_write_report` | Write upload file to path before uploading | Optional | `path_to_write_report` | Write upload file to path before uploading | Optional
| `verbose` | Specify whether the Codecov output should be verbose | Optional | `verbose` | Specify whether the Codecov output should be verbose | Optional
| `xcode_derived_data` | Custom Derived Data Path for Coverage.profdata and gcov processing | Optional
| `xcode_package` | Specify packages to build coverage. Uploader will only build these packages. This can significantly reduces time to build coverage reports. -J 'MyAppName' Will match "MyAppName" and "MyAppNameTests" -J '^ExampleApp$' Will match only "ExampleApp" not "ExampleAppTests" | Optional
### Example `workflow.yml` with Codecov Action ### Example `workflow.yml` with Codecov Action

View File

@@ -14,6 +14,8 @@ try {
const dir = core.getInput("directory"); const dir = core.getInput("directory");
const write_path = core.getInput("path_to_write_report"); const write_path = core.getInput("path_to_write_report");
const verbose = core.getInput("verbose"); const verbose = core.getInput("verbose");
const xcode_derived_data = core.getInput("xcode_derived_data");
const xcode_package = core.getInput("xcode_package");
fail_ci = core.getInput("fail_ci_if_error").toLowerCase(); fail_ci = core.getInput("fail_ci_if_error").toLowerCase();
@@ -135,6 +137,18 @@ try {
); );
} }
if (xcode_derived_data) {
execArgs.push(
"-D", `${xcode_derived_data}`
);
}
if (xcode_package) {
execArgs.push(
"-J", `${xcode_package}`
);
}
exec.exec("bash", execArgs, options) exec.exec("bash", execArgs, options)
.catch(err => { .catch(err => {
if (fail_ci) { if (fail_ci) {