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.13+.

Usage

Upload an HTML coverage report directory:

covered upload ./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 \
  --is-default-branch

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_IS_DEFAULT_BRANCH), which is the typical way to use it from CI.

covered upload --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.0.tar.gz (5.0 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.0-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: covered-0.1.0.tar.gz
  • Upload date:
  • Size: 5.0 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.0.tar.gz
Algorithm Hash digest
SHA256 28fa220191c2158e65af457864f8d6864beb13ea18c8a23f3552d75f930d6fe1
MD5 41f9c62fdc5558258850b0756f689778
BLAKE2b-256 e3b79d4b95053e1f633013a90adafeaa6009100c9e3c8e194893221585302700

See more details on using hashes here.

File details

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

File metadata

  • Download URL: covered-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.3 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ea702d751ec7e1fd70902732c4e14ea8f203191c0a6e40f8dec2cc5212fa0751
MD5 98c5530143643c7b51629afa14768a30
BLAKE2b-256 b87f6851c3dd4c46d4dd3eeba00c97a25f9d6543d41c14cd347c5586dbfd7f95

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