Datadog Code Coverage Upload
ActionsTags
(1)Verified
A GitHub Action to upload code coverage report files to Datadog.
This action uses the datadog-ci standalone binary (installed via install-datadog-ci-github-action), so no Node.js setup is required.
name: Test Code
on: [push]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: make tests
- uses: DataDog/coverage-upload-github-action@v1
with:
api_key: ${{ secrets.DD_API_KEY }}- uses: DataDog/coverage-upload-github-action@v1
with:
api_key: ${{ secrets.DD_API_KEY }}
flags: "type:unit-tests,jvm-21"- uses: DataDog/coverage-upload-github-action@v1
with:
api_key: ${{ secrets.DD_API_KEY }}
files: ./coverage
ignored-paths: "**/vendor"- uses: DataDog/coverage-upload-github-action@v1
with:
api_key: ${{ secrets.DD_API_KEY }}
version: "v5.6.0"| Name | Description | Required | Default |
|---|---|---|---|
api_key |
Datadog API key to use to upload the reports. | Yes | |
site |
The Datadog site to upload the reports to. | No | datadoghq.com |
files |
Directories, files, or glob patterns used when looking for coverage report files. | No | . |
ignored-paths |
A comma-separated list of paths to exclude from report file discovery. Glob patterns are supported. | No | |
flags |
Flags for grouping and filtering (e.g., type:unit-tests,jvm-21). Comma-separated, max 32 per report. |
No | |
format |
Override the format of the coverage report files (auto-detected by default). | No | |
base-path |
Base path (relative to repo root) for the file paths inside the coverage reports. | No | |
version |
Version of datadog-ci to install. Use a major version like v5 or a specific tag like v5.6.0 to pin. |
No | v5 |
extra-args |
Extra args to be passed to the datadog-ci coverage upload command. See the datadog-ci coverage upload docs for available options. |
No |
This action supports all platforms supported by the datadog-ci standalone binary:
| Runner OS | Architecture |
|---|---|
| Linux | X64, ARM64 |
| macOS | X64, ARM64 |
| Windows | X64 |
Apache 2.0 - See LICENSE for details.
Datadog Code Coverage Upload is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.