Use install-datadog-ci-github-action instead of raw datadog-ci#7
Conversation
ed50f96 to
ef13a03
Compare
…binary
Previously the action required setting up a Node.js runtime and running
datadog-ci via npx, adding ~15-30s of overhead. This switches to
DataDog/install-datadog-ci-github-action which downloads a precompiled
standalone binary in ~2-5s with no Node.js dependency.
Action input changes:
- Remove auto-discovery (flag only exists on junit upload, not coverage)
- Remove node-version and datadog-ci-version (replaced by version)
- Add flags, format, and base-path inputs exposed by the CLI
- Add version input (default: v5, supports pinning e.g. v5.6.0)
All user inputs interpolated into the shell script are now passed via
env vars to prevent script injection via ${{ }} expansion.
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
ef13a03 to
4ee8d4f
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4ee8d4f773
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
- Switch optional_args from a string to a bash array so values containing spaces (e.g. base-path: "my coverage") are passed as single tokens instead of being split into multiple arguments (addresses Codex P2 comment) - Replace echo|xargs flag trimming with pure-bash parameter expansion to avoid subprocess forks and xargs's quote/backslash interpretation - Add rationale comment to shellcheck disable explaining the intentional word-splitting of flags_args, EXTRA_ARGS, and FILES Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
| - uses: actions/checkout@v4 | ||
| - run: make tests | ||
| - uses: datadog/coverage-upload-github-action@v1 | ||
| - uses: DataDog/coverage-upload-github-action@v2 |
There was a problem hiding this comment.
I think we can keep v1 here, the repo has no tags and no releases yet
There was a problem hiding this comment.
Same for the other examples below
| | `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. | No | | |
There was a problem hiding this comment.
Perhaps we can add a link to the coverage upload command's readme here, so the users could go there to see which additional parameters exist
- Use @v1 in README examples (no releases exist yet, so @v2 is premature) - Add link to datadog-ci coverage upload docs in extra-args description Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Summary
Stacks on #6.
Previously the action required setting up a full Node.js runtime and downloading
datadog-civianpxon every run (~15-30s). This PR switches toDataDog/install-datadog-ci-github-actionwhich downloads a precompiled standalone binary in ~2-5s with no Node.js dependency.Action input changes:
auto-discovery— flag only exists onjunit upload, notcoverage uploadnode-versionanddatadog-ci-version— replaced byversionflags,format,base-pathinputs exposed by the CLIversioninput (default:v5, supports pinning e.g.v5.6.0)Security: all user inputs interpolated into the shell script are now passed via
env:variables instead of direct${{ }}expansion in therun:block, preventing potential script injection.Test plan
test-uploadpasses on ubuntu and macostest-pinned-versionpasses withv5.6.0flagsinput correctly expands to multiple--flagsarguments🤖 Generated with Claude Code