the coverage metrics seem to be a bit all over the place. This could be because some of the uploads to codecov are failing.
This can occur due to github's rate limiting API, and this is silent since by default the codecov action doesn't fail the job if the upload fails.
The best way to address this is to add the CODECOV_TOKEN to the repository secrets. When uploading using this token, there's no rate-limiting and this failure mode can no longer occur.
https://docs.codecov.com/docs/adding-the-codecov-token
You can also configure the codecov action to fail the build if the upload fails.
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: lcov.info
flags: ${{ matrix.crate }}
fail_ci_if_error: true
I'd suggest doing both
the coverage metrics seem to be a bit all over the place. This could be because some of the uploads to codecov are failing.
This can occur due to github's rate limiting API, and this is silent since by default the codecov action doesn't fail the job if the upload fails.
The best way to address this is to add the CODECOV_TOKEN to the repository secrets. When uploading using this token, there's no rate-limiting and this failure mode can no longer occur.
https://docs.codecov.com/docs/adding-the-codecov-token
You can also configure the codecov action to fail the build if the upload fails.
I'd suggest doing both