Skip to main content

Upload coverage reports to 'covered'

Project description

covered
Make it green.

covered

CLI for uploading HTML coverage reports to a self-hosted covered backend, then setting a GitHub commit status with the coverage value.

Install

pip install covered

Requires Python 3.10+.

Usage

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-cache

Every 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.

What it does

  1. Requests a temporary upload session from the covered backend.
  2. Uploads every file in the given directory to S3 in parallel (default concurrency: 50).
  3. Reads the coverage percentage from index.html in the report.
  4. Posts a covered commit status to GitHub (success if >= --coverage-threshold, otherwise failure).
  5. On the default branch, invalidates the badge cache and purges GitHub's Camo cache for the README badge.

License

MIT. See the project repository for the full license text.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

covered-0.1.1.tar.gz (5.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

covered-0.1.1-py3-none-any.whl (6.5 kB view details)

Uploaded Python 3

File details

Details for the file covered-0.1.1.tar.gz.

File metadata

  • Download URL: covered-0.1.1.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for covered-0.1.1.tar.gz
Algorithm Hash digest
SHA256 df068e542b7631620df311f5b5f2a61807e54680cb75bd1b8db0811f03d77bfa
MD5 a8e9da38112fa50a5c555d80297bebc2
BLAKE2b-256 328515812f15ce8e188eb6f70af8101b2c5ee2b192cd3df7ce2c3a750ea3471e

See more details on using hashes here.

File details

Details for the file covered-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: covered-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 6.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for covered-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9f2439c0d990aabe2c6de17e28aa6192b792c35bf41989c10a77414454221c5c
MD5 c25e65ff82171508cde22ec1ae1cb01d
BLAKE2b-256 81fab660533e2d74b54ae942b9675b7a04b95876da900d2a1342f381361fd610

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page