Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,4 @@ updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: weekly

- package-ecosystem: npm
directory: /
schedule:
interval: daily
interval: weekly
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
.idea/
node_modules/
1 change: 0 additions & 1 deletion .npmrc

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,5 @@ The action has the following options:
| `service` | Service name to use with the uploaded test results. | False | |
| `env` | Optional environment to add to the tests | False | |
| `logs` | When 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-version` | Override the @datadog/datadog-ci version. Leave empty to use the bundled version. | False | |
| `datadog-ci-version` | Optionally pin the @datadog/datadog-ci version. | False | `latest` |
| `extra-args` | Extra args to be passed to the datadog-ci junit upload command. | False | |
24 changes: 3 additions & 21 deletions action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,42 +42,24 @@ inputs:
description: Set to "true" to enable forwarding content from XML reports as logs.
datadog-ci-version:
required: false
description: The version of the @datadog/datadog-ci package to use. Leave empty to use the bundled version from package.json (recommended for caching).
description: The version of the @datadog/datadog-ci package to use. It defaults to the latest release (`latest`).
default: "latest"
extra-args:
default: ""
description: Extra args to be passed to the datadog-ci cli.
required: false
runs:
using: "composite"
steps:
- name: Resolve action path
id: action-path
shell: bash
run: echo "path=$(cd "${{ github.action_path }}" && pwd)" >> "$GITHUB_OUTPUT"

- name: Install node
uses: actions/setup-node@v4
with:
node-version: ${{ inputs.node-version }}
cache: npm
cache-dependency-path: ${{ steps.action-path.outputs.path }}/package-lock.json

- name: Install datadog-ci (bundled version)
if: inputs.datadog-ci-version == ''
shell: bash
working-directory: ${{ github.action_path }}
run: npm ci

- name: Upload the JUnit files
shell: bash
run: |
if [ -n "${{ inputs.datadog-ci-version }}" ]; then
DATADOG_CI="npx @datadog/datadog-ci@${{ inputs.datadog-ci-version }}"
else
DATADOG_CI="${{ github.action_path }}/node_modules/.bin/datadog-ci"
fi

$DATADOG_CI junit upload \
npx @datadog/datadog-ci@${{ inputs.datadog-ci-version}} junit upload \
--max-concurrency ${{ inputs.concurrency }} \
${{ inputs.logs == 'true' && '--logs' || '' }} \
${{ inputs.auto-discovery == 'true' && '--auto-discovery' || '' }} \
Expand Down
Loading
Loading