Skip to content

Commit d88e70e

Browse files
ci: add Datadog code coverage upload (#1718)
## What does this PR do? We're migrating Datadog repositories from Codecov to [Datadog Code Coverage](https://docs.datadoghq.com/code_analysis/code_coverage/) for tracking test coverage. This PR is the first step: it adds a Datadog coverage upload **alongside** the existing Codecov upload so we can run both systems in parallel and verify parity before switching over. ## Changes - Added a `DataDog/coverage-upload-github-action@v1` step to the `coverage` workflow, immediately after the existing Codecov upload step. - The existing Codecov upload is **unchanged** — nothing is removed or modified. - The Datadog upload uses `continue-on-error: true`, so it will never block CI even if it fails. ## Why are we doing this? As part of a company-wide effort, we're consolidating code coverage reporting into Datadog's own Code Coverage product. This gives us: - Coverage data integrated directly into Datadog CI Visibility - PR gates and coverage checks natively in Datadog - No dependency on a third-party service (Codecov) for coverage reporting ## Validation CI has run on this PR and both uploads completed successfully. Coverage numbers match: | System | Coverage | |--------|----------| | Codecov | 71.24% | | Datadog | 71.25% | The 0.01% difference is within expected tolerance (rounding differences in line counting). ## Next steps (not in this PR) Once this PR is merged and we've confirmed Datadog coverage is stable over several commits: 1. Remove the Codecov upload step and `CODECOV_TOKEN` secret 2. Remove `.codecov.yml` 3. Optionally configure PR gates in `code-coverage.datadog.yml` ## No action needed from reviewers beyond normal review This is a low-risk, additive change. The new step runs independently of the existing CI pipeline and cannot cause test failures. Co-authored-by: bjorn.antonsson <[email protected]>
1 parent c6ef98e commit d88e70e

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

.github/workflows/coverage.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,3 +50,11 @@ jobs:
5050
token: ${{ secrets.CODECOV_TOKEN }}
5151
files: lcov.info
5252
fail_ci_if_error: true
53+
- name: Upload coverage to Datadog
54+
if: always()
55+
continue-on-error: true
56+
uses: DataDog/coverage-upload-github-action@d2cf302a39c05e0ad22063360a2bf6ce0cc4906c # v1
57+
with:
58+
api_key: ${{ secrets.DATADOG_API_KEY }}
59+
files: lcov.info
60+
format: lcov

0 commit comments

Comments
 (0)