Add coverage checks#390
Conversation
42a5aa0 to
037e2df
Compare
|
🎯 Code Coverage (details) 🔗 Commit SHA: 30da9cf | Docs | Datadog PR Page | Give us feedback! |
Integrate with DD Code Coverage to enable coverage reports in CI pipeline. Set overall threshold to be 83% (current coverage state) and patch gate to 90% as a reasonable first try. Signed-off-by: Mark Kirichenko <mark.kirichenko@datadoghq.com>
Exclude 1.21 due to a known Macos linker bug. Signed-off-by: Mark Kirichenko <mark.kirichenko@datadoghq.com>
037e2df to
30da9cf
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 30da9cf49f
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| - name: Upload coverage to Datadog | ||
| uses: datadog/coverage-upload-github-action@d9548b1c3c4ab639d5d3ab29a1508af188975f77 | ||
| with: | ||
| api_key: ${{ secrets.DD_API_KEY }} |
There was a problem hiding this comment.
Skip coverage upload when the secret is unavailable
Because this workflow also runs on pull_request, PRs from forks and Dependabot events do not receive repository secrets, so secrets.DD_API_KEY resolves empty while the Datadog upload action requires api_key. In those contexts the new coverage job will fail after the tests pass, blocking or red-marking otherwise valid external PRs; guard this step/job to trusted events or make the upload conditional on the secret being present.
Useful? React with 👍 / 👎.
Integrate this repository with DD Code Coverage to enable coverage reports in CI, and set initial overall and patch thresholds to reasonable first try numbers.