diff --git a/README.md b/README.md index ef47686..59ffcb7 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/index.js b/index.js index f15e76e..58cef7a 100644 --- a/index.js +++ b/index.js @@ -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(); @@ -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) {