mirror of
https://github.com/codecov/codecov-action.git
synced 2025-12-08 16:16:24 +00:00
Update README.md
This commit is contained in:
63
README.md
63
README.md
@@ -1,6 +1,6 @@
|
|||||||
# Codecov GitHub Action
|
# Codecov GitHub Action
|
||||||
|
|
||||||
[](https://github.com/marketplace/actions/codecov)
|
[](https://github.com/marketplace/actions/codecov)
|
||||||
[](https://app.fossa.com/projects/git%2Bgithub.com%2Fcodecov%2Fcodecov-action?ref=badge_shield)
|
[](https://app.fossa.com/projects/git%2Bgithub.com%2Fcodecov%2Fcodecov-action?ref=badge_shield)
|
||||||
[](https://github.com/codecov/codecov-action/actions/workflows/main.yml)
|
[](https://github.com/codecov/codecov-action/actions/workflows/main.yml)
|
||||||
### Easily upload coverage reports to Codecov from GitHub Actions
|
### Easily upload coverage reports to Codecov from GitHub Actions
|
||||||
@@ -8,9 +8,11 @@
|
|||||||
## v4 Release
|
## v4 Release
|
||||||
`v4` of the Codecov GitHub Action will use the [Codecov CLI](https://github.com/codecov/codecov-cli) to upload coverage reports to Codecov.
|
`v4` of the Codecov GitHub Action will use the [Codecov CLI](https://github.com/codecov/codecov-cli) to upload coverage reports to Codecov.
|
||||||
|
|
||||||
Breaking Changes
|
### Breaking Changes
|
||||||
- Tokenless uploading is unsupported. However, PRs made from forks to the upstream public repos will support tokenless (e.g. contributors to OS projects do not need the upstream repo's Codecov token)
|
- Tokenless uploading is unsupported. However, PRs made from forks to the upstream public repos will support tokenless (e.g. contributors to OS projects do not need the upstream repo's Codecov token)
|
||||||
- Various arguments to the Action have been removed
|
- Various arguments to the Action have been removed
|
||||||
|
|
||||||
|
### Dependabot
|
||||||
- For repositories using `Dependabot`, users will need to ensure that it has access to the Codecov token for PRs from Dependabot to upload coverage.
|
- For repositories using `Dependabot`, users will need to ensure that it has access to the Codecov token for PRs from Dependabot to upload coverage.
|
||||||
|
|
||||||
`v3` versions and below will not have access to CLI features (e.g. global upload token, ATS).
|
`v3` versions and below will not have access to CLI features (e.g. global upload token, ATS).
|
||||||
@@ -65,47 +67,40 @@ steps:
|
|||||||
|
|
||||||
Codecov's Action supports inputs from the user. These inputs, along with their descriptions and usage contexts, are listed in the table below:
|
Codecov's Action supports inputs from the user. These inputs, along with their descriptions and usage contexts, are listed in the table below:
|
||||||
|
|
||||||
| Input | Description | Usage |
|
| Input | Description | Required |
|
||||||
| :---: | :---: | :---: |
|
| :---: | :---: | :---: |
|
||||||
| `token` | Used to authorize coverage report uploads | *Required |
|
| `token` | Repository Codecov token. Used to authorize report uploads | Optional
|
||||||
| `move_coverage_to_trash` | Move discovered coverage reports to the trash | Optional
|
| `codecov_yml_path` | Specify the path to the Codecov YML | Optional
|
||||||
| `commit_parent` | The commit SHA of the parent for which you are uploading coverage. If not present, the parent will be determined using the API of your repository provider. When using the repository provider's API, the parent is determined via finding the closest ancestor to the commit. | Optional
|
| `commit_parent` | Override to specify the parent commit SHA | Optional
|
||||||
|
| `directory` | Directory to search for coverage reports. | Optional
|
||||||
|
| `disable_search` | Disable search for coverage files. This is helpful when specifying what files you want to upload with the --file option. | Optional
|
||||||
|
| `disable_file_fixes` | Disable file fixes to ignore common lines from coverage (e.g. blank lines or empty brackets) | Optional
|
||||||
| `dry_run` | Don't upload files to Codecov | Optional
|
| `dry_run` | Don't upload files to Codecov | Optional
|
||||||
| `env_vars` | Environment variables to tag the upload with. Multiple env variables can be separated with commas (e.g. `OS,PYTHON`) | Optional
|
| `env_vars` | Environment variables to tag the upload with (e.g. PYTHON | OS,PYTHON) | Optional
|
||||||
| `fail_ci_if_error` | Specify if CI pipeline should fail when Codecov runs into errors during upload. *Defaults to **false*** | Optional
|
| `exclude` | Folders to exclude from search | Optional
|
||||||
| `files` | Comma-separated paths to the coverage report(s). Negated paths are supported by starting with `!` | Optional
|
| `fail_ci_if_error` | Specify whether or not CI build should fail if Codecov runs into an error during upload | Optional
|
||||||
| `flags` | Flag the upload to group coverage metrics (unittests, uitests, etc.). Multiple flags are separated by a comma (ui,chrome) | Optional
|
| `file` | Path to coverage file to upload | Optional
|
||||||
| `full_report` | Specify the path of a full Codecov report to re-upload | Optional
|
| `files` | Comma-separated list of files to upload | Optional
|
||||||
| `functionalities` | Toggle functionalities | Optional
|
| `flags` | Flag upload to group coverage metrics (e.g. unittests | integration | ui,chrome) | Optional
|
||||||
| -- `network` | Disable uploading the file network | Optional
|
| `handle_no_reports_found` | Raise no exceptions when no coverage reports found | Optional
|
||||||
| -- `fixes` | Enable file fixes to ignore common lines from coverage | Optional
|
| `job_code` | The job code | Optional
|
||||||
| -- `search` | Disable searching for coverage files | Optional
|
| `name` | User defined upload name. Visible in Codecov UI | Optional
|
||||||
| `gcov` | Run with gcov support | Optional
|
| `os` | Override the assumed OS. Options are linux | macos | windows | . | Optional
|
||||||
| `gcov_args` | Extra arguments to pass to gcov | Optional
|
|
||||||
| `gcov_ignore` | Paths to ignore during gcov gathering | Optional
|
|
||||||
| `gcov_include` | Paths to include during gcov gathering | Optional
|
|
||||||
| `gcov_executable` | gcov executable to run. Defaults to gcov. | Optional
|
|
||||||
| `name` | Custom defined name for the upload | Optional
|
|
||||||
| `network_filter` | Specify a filter on the files listed in the network section of the Codecov report. Useful for upload-specific path fixing | Optional
|
|
||||||
| `network_prefix` | Specify a prefix on files listed in the network section of the Codecov report. Useful to help resolve path fixing | Optional
|
|
||||||
| `os` | Specify the OS (linux, macos, windows, alpine) | Optional
|
|
||||||
| `override_branch` | Specify the branch name | Optional
|
| `override_branch` | Specify the branch name | Optional
|
||||||
| `override_build` | Specify the build number | Optional
|
| `override_build` | Specify the build number | Optional
|
||||||
|
| `override_build_url` | The URL of the build where this is running | Optional
|
||||||
| `override_commit` | Specify the commit SHA | Optional
|
| `override_commit` | Specify the commit SHA | Optional
|
||||||
| `override_pr` | Specify the pull request number | Optional
|
| `override_pr` | Specify the pull request number | Optional
|
||||||
| `override_tag` | Specify the git tag | Optional
|
| `plugin` | plugins to run. Options: xcode, gcov, pycoverage. The default behavior runs them all. | Optional
|
||||||
|
| `plugins` | Comma-separated list of plugins for use during upload. | Optional
|
||||||
|
| `report_code` | The code of the report. If unsure, do not include | Optional
|
||||||
| `root_dir` | Used when not in git/hg project to identify project root directory | Optional
|
| `root_dir` | Used when not in git/hg project to identify project root directory | Optional
|
||||||
| `directory` | Directory to search for coverage reports. | Optional
|
|
||||||
| `slug` | Specify the slug manually (Enterprise use) | Optional
|
| `slug` | Specify the slug manually (Enterprise use) | Optional
|
||||||
| `swift` | Run with swift coverage support | Optional
|
| `url` | Specify the base url to upload (Enterprise use) | Optional
|
||||||
| -- `swift_project` | Specify the swift project to speed up coverage conversion | Optional
|
| `use_legacy_upload_endpoint` | Use the legacy upload endpoint | Optional
|
||||||
| `upstream_proxy` | The upstream http proxy server to connect through | Optional
|
|
||||||
| `url` | Change the upload host (Enterprise use) | Optional
|
|
||||||
| `verbose` | Specify whether the Codecov output should be verbose | Optional
|
| `verbose` | Specify whether the Codecov output should be verbose | Optional
|
||||||
| `version` | Specify which version of the Codecov Uploader should be used. Defaults to `latest` | Optional
|
| `version` | Specify which version of the Codecov CLI should be used. Defaults to `latest` | Optional
|
||||||
| `working-directory` | Directory in which to execute `codecov.sh` | Optional
|
| `working-directory` | Directory in which to execute codecov.sh | Optional
|
||||||
| `xtra_args` | Add additional uploader args that may be missing in the Action | Optional
|
|
||||||
|
|
||||||
|
|
||||||
### Example `workflow.yml` with Codecov Action
|
### Example `workflow.yml` with Codecov Action
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user