Skip to content

Commit fb6775d

Browse files
fix: bump to v5 and update README (#1655)
* fix: bump to v5 and update README * Update README.md * Update README.md Co-authored-by: Joe Becher <[email protected]> * Update README.md --------- Co-authored-by: Joe Becher <[email protected]>
1 parent 21f471b commit fb6775d

File tree

1 file changed

+47
-35
lines changed

1 file changed

+47
-35
lines changed

README.md

+47-35
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ You can see their usage in the `action.yml` [file](https://github.com/codecov/co
4343

4444
## Usage
4545

46-
To integrate Codecov with your Actions pipeline, specify the name of this repository with a tag number (`@v4` is recommended) as a `step` within your `workflow.yml` file.
46+
To integrate Codecov with your Actions pipeline, specify the name of this repository with a tag number (`@v5` is recommended) as a `step` within your `workflow.yml` file.
4747

4848
This Action also requires you to [provide an upload token](https://docs.codecov.io/docs/frequently-asked-questions#section-where-is-the-repository-upload-token-found-) from [codecov.io](https://www.codecov.io) (tip: in order to avoid exposing your token, [store it](https://docs.codecov.com/docs/adding-the-codecov-token#github-actions) as a `secret`).
4949

@@ -60,13 +60,13 @@ Inside your `.github/workflows/workflow.yml` file:
6060
```yaml
6161
steps:
6262
- uses: actions/checkout@main
63-
- uses: codecov/codecov-action@v4
63+
- uses: codecov/codecov-action@v5
6464
with:
6565
fail_ci_if_error: true # optional (default = false)
6666
files: ./coverage1.xml,./coverage2.xml # optional
6767
flags: unittests # optional
6868
name: codecov-umbrella # optional
69-
token: ${{ secrets.CODECOV_TOKEN }} # required
69+
token: ${{ secrets.CODECOV_TOKEN }}
7070
verbose: true # optional (default = false)
7171
```
7272
@@ -75,7 +75,7 @@ The Codecov token can also be passed in via environment variables:
7575
```yaml
7676
steps:
7777
- uses: actions/checkout@main
78-
- uses: codecov/codecov-action@v4
78+
- uses: codecov/codecov-action@v5
7979
with:
8080
fail_ci_if_error: true # optional (default = false)
8181
files: ./coverage1.xml,./coverage2.xml # optional
@@ -92,7 +92,7 @@ steps:
9292
For users with [OpenID Connect(OIDC) enabled](https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/about-security-hardening-with-openid-connect), the Codecov token is not necessary. You can use OIDC with the `use_oidc` argument as following.
9393

9494
```yaml
95-
- uses: codecov/codecov-action@v4
95+
- uses: codecov/codecov-action@v5
9696
with:
9797
use_oidc: true
9898
```
@@ -105,38 +105,50 @@ Codecov's Action supports inputs from the user. These inputs, along with their d
105105

106106
| Input | Description | Required |
107107
| :--- | :--- | :---: |
108-
| `token` | Repository Codecov token. Used to authorize report uploads | *Required
109-
| `codecov_yml_path` | Specify the path to the Codecov YML | Optional
110-
| `commit_parent` | Override to specify the parent commit SHA | Optional
111-
| `directory` | Directory to search for coverage reports. | Optional
112-
| `disable_search` | Disable search for coverage files. This is helpful when specifying what files you want to upload with the --file option. | Optional
113-
| `disable_file_fixes` | Disable file fixes to ignore common lines from coverage (e.g. blank lines or empty brackets) | Optional
108+
| `binary` | The file location of a pre-downloaded version of the CLI. If specified, integrity checking will be bypassed. | Optional
109+
| `codecov_yml_path` | The location of the codecov.yml file. This is crrently ONLY used for automated test selection (https://docs.codecov.com/docs/getting-started-with-ats). Note that for all other cases, the Codecov yaml will need to be locate
110+
d as described here: https://docs.codecov.com/docs/codecov-yaml#can-i-name-the-file-codecovyml | Optional
111+
| `commit_parent` | SHA (with 40 chars) of what should be the parent of this commit. | Optional
112+
| `directory` | Folder to search for coverage files. Default to the current working directory | Optional
113+
| `disable_file_fixes` | Disable file fixes to ignore common lines from coverage (e.g. blank lines or empty brackets). Read more here https://docs.codecov.com/docs/fixing-reports | Optional
114+
| `disable_search` | Disable search for coverage files. This is helpful when specifying what files you want to upload with the files option. | Optional
115+
| `disable_safe_directory` | Disable setting safe directory. Set to true to disable. | Optional
114116
| `dry_run` | Don't upload files to Codecov | Optional
115117
| `env_vars` | Environment variables to tag the upload with (e.g. PYTHON \| OS,PYTHON) | Optional
116-
| `exclude` | Folders to exclude from search | Optional
117-
| `fail_ci_if_error` | Specify whether or not CI build should fail if Codecov runs into an error during upload | Optional
118-
| `file` | Path to coverage file to upload | Optional
119-
| `files` | Comma-separated list of files to upload | Optional
120-
| `flags` | Flag upload to group coverage metrics (e.g. unittests \| integration \| ui,chrome) | Optional
121-
| `handle_no_reports_found` | Raise no exceptions when no coverage reports found | Optional
122-
| `job_code` | The job code | Optional
123-
| `name` | User defined upload name. Visible in Codecov UI | Optional
124-
| `os` | Override the assumed OS. Options are linux \| macos \| windows \| . | Optional
125-
| `override_branch` | Specify the branch name | Optional
126-
| `override_build` | Specify the build number | Optional
118+
| `exclude` | Comma-separated list of folders to exclude from search. | Optional
119+
| `fail_ci_if_error` | On error, exit with non-zero code | Optional
120+
| `files` | Comma-separated explicit list of files to upload. These will be added to the coverage files found for upload. If you wish to only upload the specified files, please consider using "disable-search" to disable uploading other files. | Optional
121+
tional
122+
| `flags` | Comma-separated list of flags to upload to group coverage metrics. | Optional
123+
| `git_service` | Override the git_service (e.g. github_enterprise) | Optional
124+
| `gcov_args` | Extra arguments to pass to gcov | Optional
125+
| `gcov_executable` | gcov executable to run. Defaults to 'gcov' | Optional
126+
| `gcov_ignore` | Paths to ignore during gcov gathering | Optional
127+
| `gcov_include` | Paths to include during gcov gathering | Optional
128+
| `handle_no_reports_found` | If no coverage reports are found, do not raise an exception. | Optional
129+
| `job_code` | | Optional
130+
| `name` | Custom defined name of the upload. Visible in the Codecov UI | Optional
131+
| `network_filter` | Specify a filter on the files listed in the network section of the Codecov report. This will only add files whose path begin with the specified filter. Useful for upload-specific path fixing. | Optional
132+
| `network_prefix` | Specify a prefix on files listed in the network section of the Codecov report. Useful to help resolve path fixing. | Optional
133+
| `os` | Override the assumed OS. Options available at cli.codecov.io | Optional
134+
| `override_branch` | Specify the branch to be displayed with this commit on Codecov | Optional
135+
| `override_build` | Specify the build number manually | Optional
127136
| `override_build_url` | The URL of the build where this is running | Optional
128-
| `override_commit` | Specify the commit SHA | Optional
129-
| `override_pr` | Specify the pull request number | Optional
130-
| `plugin` | plugins to run. Options: xcode, gcov, pycoverage. The default behavior runs them all. | Optional
131-
| `plugins` | Comma-separated list of plugins for use during upload. | Optional
132-
| `report_code` | The code of the report. If unsure, do not include | Optional
133-
| `root_dir` | Used to specify the location of your .git root to identify project root directory | Optional
134-
| `slug` | Specify the slug manually (Enterprise use) | Optional
135-
| `url` | Specify the base url to upload (Enterprise use) | Optional
136-
| `use_legacy_upload_endpoint` | Use the legacy upload endpoint | Optional
137-
| `use_oidc` | Use OpenID Connect for verification instead of token. This will ignore any token supplied. Please see [GitHub documentation](https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/about-security-hardening-with-openid-connect) for details.
138-
| `verbose` | Specify whether the Codecov output should be verbose | Optional
139-
| `version` | Specify which version of the Codecov CLI should be used. Defaults to `latest` | Optional
137+
| `override_commit` | Commit SHA (with 40 chars) | Optional
138+
| `override_pr` | Specify the pull request number manually. Used to override pre-existing CI environment variables. | Optional
139+
| `plugins` | Comma-separated list of plugins to run. Specify `noop` to turn off all plugins | Optional
140+
| `report_code` | The code of the report if using local upload. If unsure, leave unset. Read more here https://docs.codecov.com/docs/the-codecov-cli#how-to-use-local-upload | Optional
141+
| `report_type` | The type of file to upload, coverage by default. Possible values are "testing", "coverage". | Optional
142+
| `root_dir` | Root folder from which to consider paths on the network section. Defaults to current working directory. | Optional
143+
| `skip_validation` | Skip integrity checking of the CLI. This is NOT recommended. | Optional
144+
| `slug` | [Required when using the org token] Set to the owner/repo slug used instead of the private repo token. Only applicable to some Enterprise users. | Optional
145+
| `swift_project` | Specify the swift project name. Useful for optimization. | Optional
146+
| `token` | Repository Codecov token. Used to authorize report uploads | Optional
147+
| `url` | Set to the Codecov instance URl. Used by Dedicated Enterprise Cloud customers. | Optional
148+
| `use_legacy_upload_endpoint` | Use the legacy upload endpoint. | Optional
149+
| `use_oidc` | Use OIDC instead of token. This will ignore any token supplied | Optional
150+
| `verbose` | Enable verbose logging | Optional
151+
| `version` | Which version of the Codecov CLI to use (defaults to 'latest') | Optional
140152
| `working-directory` | Directory in which to execute codecov.sh | Optional
141153

142154
### Example `workflow.yml` with Codecov Action
@@ -165,7 +177,7 @@ jobs:
165177
pip install pytest-cov
166178
pytest --cov=./ --cov-report=xml
167179
- name: Upload coverage to Codecov
168-
uses: codecov/codecov-action@v4
180+
uses: codecov/codecov-action@v5
169181
with:
170182
directory: ./coverage/reports/
171183
env_vars: OS,PYTHON

0 commit comments

Comments
 (0)