Add verbosity

This commit is contained in:
Tom Hu
2020-10-16 18:27:17 -04:00
parent dade30aaa0
commit 283d2693b9
6 changed files with 3568 additions and 2793 deletions

View File

@@ -25,6 +25,7 @@ steps:
flags: unittests # optional
name: codecov-umbrella # optional
fail_ci_if_error: true # optional (default = false)
verbose: true # optional (default = false)
```
>**Note**: This assumes that you've set your Codecov token inside *Settings > Secrets* as `CODECOV_TOKEN`. If not, you can [get an upload token](https://docs.codecov.io/docs/frequently-asked-questions#section-where-is-the-repository-upload-token-found-) for your specific repo on [codecov.io](https://www.codecov.io). Keep in mind that secrets are *not* available to forks of repositories.
@@ -45,6 +46,7 @@ Codecov's Action currently supports five inputs from the user: `token`, `file`,
| `name` | Custom defined name for the upload | 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
| `verbose` | Specify whether the Codecov output should be verbose | Optional
### Example `workflow.yml` with Codecov Action
@@ -83,6 +85,7 @@ jobs:
name: codecov-umbrella
fail_ci_if_error: true
path_to_write_report: ./coverage/codecov_report.gz
verbose: true
```
## Contributing

View File

@@ -29,6 +29,9 @@ inputs:
fail_ci_if_error:
description: 'Specify whether or not CI build should fail if Codecov runs into an error during upload'
required: false
verbose:
description: 'Specify whether the Codecov output should be verbose'
required: false
branding:
color: 'red'
icon: 'umbrella'

6330
dist/index.js vendored

File diff suppressed because it is too large Load Diff

View File

@@ -13,6 +13,7 @@ try {
const env_vars = core.getInput("env_vars");
const dir = core.getInput("directory");
const write_path = core.getInput("path_to_write_report");
const verbose = core.getInput("verbose");
fail_ci = core.getInput("fail_ci_if_error").toLowerCase();
@@ -126,6 +127,12 @@ try {
);
}
if (verbose) {
execArgs.push(
"-v"
);
}
exec.exec("bash", execArgs, options)
.catch(err => {
if (fail_ci) {

2
package-lock.json generated
View File

@@ -1,6 +1,6 @@
{
"name": "codecov-action",
"version": "1.0.13",
"version": "1.0.14",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View File

@@ -1,6 +1,6 @@
{
"name": "codecov-action",
"version": "1.0.13",
"version": "1.0.14",
"description": "Upload coverage reports to Codecov from GitHub Actions",
"main": "index.js",
"scripts": {