Adding Codecov

1. Code Changes (done by any developer, merged by someone with repo write access)

The developer should add a covecov.yml file if they have not already, e.g.:

coverage: status: project: default: enabled: yes target: auto patch: default: enabled: yes target: 100% comment: false

2. GitHub App settings (done by a GitHub org admin, at tCRIL for openedx)

Maintainer instructions: File a GitHub Issue (uncategorized) with the tCRIL Engineering team to request Codecov get set up properly. Include “Codecov: reponame” in the ticket title and in the body add a link to your codecov.yml file from master/main.

tCRIL Admin Instructions: Navigate to the Codecov Github App Setting page, and add the GitHub repository in question to the list of repositories near the bottom of the page. Don’t forget to click the “Save” button.

3. Branch protection (done by a repository admin)

If you would like to require Codecov to pass for merges to a protected branch, you will first need a commit to be pushed to a PR against the branch in question after making the changes above. You don't necessarily need to merge this, there just needs to be at least one existing run of the Codecov check against that branch.

You can now make the Codecov check required for merges to that branch: Repo → Settings → Branches → Branch Protection Rules → Edit on the desired branch. For example, . Then under “Require status checks to pass before merging”, search for and select the Codecov check(s) to be required. Finally, click the “Save Changes” button at the bottom of the page.