CLI for uploading HTML coverage reports to a self-hosted covered backend, then setting a GitHub commit status with the coverage value.
pip install coveredRequires Python 3.10+.
Upload an HTML coverage report directory:
covered ./htmlcov \
--api-url https://covered.example.com \
--api-key "$COVERED_API_KEY" \
--repo-owner my-org \
--repo-name my-repo \
--commit-sha "$GITHUB_SHA" \
--gh-token "$GITHUB_TOKEN" \
--coverage-threshold 90 \
--purge-cacheEvery option also reads from a matching environment variable (COVERED_API_URL, COVERED_API_KEY, COVERED_REPO_OWNER, COVERED_REPO_NAME, COVERED_COMMIT_SHA, COVERED_GH_TOKEN, COVERED_COVERAGE_THRESHOLD, COVERED_PURGE_CACHE), which is the typical way to use it from CI.
covered --help lists all options.
- Requests a temporary upload session from the covered backend.
- Uploads every file in the given directory to S3 in parallel (default concurrency: 50).
- Reads the coverage percentage from
index.htmlin the report. - Posts a
coveredcommit status to GitHub (successif>= --coverage-threshold, otherwisefailure). - On the default branch, invalidates the badge cache and purges GitHub's Camo cache for the README badge.
MIT. See the project repository for the full license text.
