Skip to content

DataDog/coverage-upload-github-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Datadog Code Coverage Upload Action

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.

Usage

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

Upload with flags

- uses: DataDog/coverage-upload-github-action@v1
  with:
    api_key: ${{ secrets.DD_API_KEY }}
    flags: "type:unit-tests,jvm-21"

Specify report files path

- uses: DataDog/coverage-upload-github-action@v1
  with:
    api_key: ${{ secrets.DD_API_KEY }}
    files: ./coverage
    ignored-paths: "**/vendor"

Pin a specific datadog-ci version

- uses: DataDog/coverage-upload-github-action@v1
  with:
    api_key: ${{ secrets.DD_API_KEY }}
    version: "v5.6.0"

Inputs

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

Supported platforms

This action supports all platforms supported by the datadog-ci standalone binary:

Runner OS Architecture
Linux X64, ARM64
macOS X64, ARM64
Windows X64

License

Apache 2.0 - See LICENSE for details.

About

GitHub Action to Upload code coverage report files to Datadog

Resources

License

Contributing

Stars

0 stars

Watchers

1 watching

Forks

Packages

 
 
 

Contributors