Codecov in private repositories
Codecov action doesn't work for private repositories unless Codecov token is added. However action doesn't fail because "fail_ci_if_error: true" is not specified and upload failure is implicit. I suggest:
- Ask user if repo will be private. If yes, then:
- Add "with: fail_ci_if_error: true" and "with: token: ${{ secrets.CODECOV_TOKEN }}" to the template
- In documentation highlight that private repos require token to be in Github Secrets, give a link to https://github.com/marketplace/actions/codecov#usage
By default we assume that user code is being committed to public repositories and we've stated that in the existing documentation (https://lincc-ppt.readthedocs.io/en/latest/source/overview.html#getting-started). We could potentially add some info to the documentation about how to suppose private repos.
One thing we've noticed is that there's already a lot of "question fatigue", and we're trying to find ways to reduce the number of questions that we ask during template hydration.
Recapping our conversation:
Looking over the template at this point, the test and coverage workflow is now using the codecov token, and we've provided instructions both in the documentation and in the post-project-setup steps to instruct users to get a token. I think that we're ok on this front.
One thing that doesn't happen, but that you call out, is with: fail_ci_if_error: true. Generally speaking it seems that everyone is ok leaving this out, with the understanding that eventually a new user will either eventually add their token, remove the codecov uploading step, or never notice.