Skip to content

Commit

Permalink
Merge pull request #174 from kingpowerclick/xcode-derived-data
Browse files Browse the repository at this point in the history
Support Xcode specificed parameters
  • Loading branch information
thomasrockhu committed Dec 10, 2020
2 parents 5155bd4 + c047d59 commit a6c42c7
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
| `path_to_write_report` | Write upload file to path before uploading | 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

Expand Down
14 changes: 14 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ try {
const dir = core.getInput("directory");
const write_path = core.getInput("path_to_write_report");
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();

Expand Down Expand Up @@ -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)
.catch(err => {
if (fail_ci) {
Expand Down

0 comments on commit a6c42c7

Please sign in to comment.