codecov-action
A GitHub Action for running codecov
To use the action you'll need an upload token.
Use like:
yaml
steps:
- uses: actions/checkout@main
- uses: codecov/codecov-action@v4
with:
fail_ci_if_error: true # optional (default = false)
files: ./coverage1.xml,./coverage2.xml # optional
flags: unittests # optional
name: codecov-umbrella # optional
token: ${{ secrets.CODECOV_TOKEN }} # required
verbose: true # optional (default = false)
Arguments
token
is the only required argumentname
will be visible in the Codecov UIdry_run
will prevent the upload to Codecov
For all available arguments see their README.
Specifying the report artifacts
Can be done using one of:
file
- a coverage report to uploadfiles
- comma-separated list of reports to uploaddirectory
- name of a directory to search for reports