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

Repository files navigation

Datadog JUnitXML Upload Action

This action installs a pre-built datadog-ci binary and uses it to upload JUnitXML files to the Test Optimization product.

Usage

name: Test Codeon: [ push ]jobs:
test:
steps:
- uses: actions/checkout@v3
- run: make tests
- uses: datadog/junit-upload-github-action@v2with:
api_key: ${{ secrets.DD_API_KEY }}

Inputs

The action has the following options:

NameDescriptionRequiredDefault
api_keyDatadog API key to use to upload the junit files.True
siteThe Datadog site to upload the files to.Falsedatadoghq.com
filesPath to file or folder containing XML files to uploadFalse.
auto-discoveryDo a recursive search and automatic XML files discovery in the folders provided in files input (current folder if omitted). Search for filenames that match *junit*.xml, *test*.xml, *TEST-*.xml.Falsetrue
ignored-pathsA comma-separated list of paths that are ignored when junit files auto-discovery is done. Glob patterns are supported.False
concurrencyControls the maximum number of concurrent file uploadsFalse20
tagsOptional extra tags to add to the tests formatted as a comma separated list of tags. Example: foo:bar,data:dogFalse
serviceService name to use with the uploaded test results.False
envOptional environment to add to the testsFalse
logsWhen set to "true" enables forwarding content from the XML reports as Logs. The content inside <system-out>, <system-err>, and <failure> is collected as logs. Logs from elements inside a <testcase> are automatically connected to the test.False
datadog-ci-versionVersion of datadog-ci to install. Defaults to the pinned datadog-ci release shipped with this action version. Use a major version like v5 to get the latest release within that major version, or a specific tag like v5.6.0 to pin. Legacy npm semver syntax (^, ~, >=, latest) is still supported but deprecated.Falsev5.21.2
github-tokenGitHub token to use for authenticated datadog-ci release resolution. Defaults to the workflow github.token when omitted.Falsegithub.token
extra-argsExtra args to be passed to the datadog-ci junit upload command.False

By default, this action installs the exact datadog-ci release pinned by the action version you use. To receive datadog-ci updates, update datadog/junit-upload-github-action to a newer release or use the datadog-ci-version configuration to specify the version or range.

This action passes the workflow github.token to the install step by default. That is primarily useful when datadog-ci-version uses a floating release selector such as v5, because GitHub release resolution can then be authenticated.

Maintainer release flow

See RELEASE.md for the local gh-based process used to bump datadog-ci and release this action.

About

GitHub Action to Upload JunitXML files to Test Optimization

Resources

Stars

10 stars

Watchers

3 watching

Forks

Releases

Packages

Used by

Contributors

Languages