Skip to content

test(CI): upload junit reports to datadog#3521

Merged
Leiyks merged 3 commits intomasterfrom
leiyks/feat-upload-junit-report-to-datadog
Jan 9, 2026
Merged

test(CI): upload junit reports to datadog#3521
Leiyks merged 3 commits intomasterfrom
leiyks/feat-upload-junit-report-to-datadog

Conversation

@Leiyks
Copy link
Contributor

@Leiyks Leiyks commented Dec 8, 2025

Description

This PR integrates Datadog Test Optimization by automatically uploading JUnit test results from CI to Datadog.

Changes

New upload script (.gitlab/upload-junit-to-datadog.sh)

  • Auto-installs dependencies (jq, Vault, datadog-ci) if not present
  • Fetches API key from Vault securely
  • Normalizes file paths from absolute to repository-relative before upload
  • Sets git.repository_url to GitHub URL for proper Test Optimization integration
  • Adds test.source.file tags to categorize tests by component
  • Gracefully handles failures (warns but doesn't fail CI jobs)

CI pipeline updates

  • Modified all test job generators to:
    • Set TEST_PHP_JUNIT environment variable for JUnit XML output path
    • Create artifacts directory for test results
    • Call upload script in after_script with appropriate source file tags

@codecov-commenter
Copy link

codecov-commenter commented Dec 8, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 61.81%. Comparing base (64813c5) to head (736b94a).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3521      +/-   ##
==========================================
- Coverage   61.95%   61.81%   -0.15%     
==========================================
  Files         140      140              
  Lines       13281    13281              
  Branches     1758     1758              
==========================================
- Hits         8228     8209      -19     
- Misses       4264     4282      +18     
- Partials      789      790       +1     

see 5 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 64813c5...736b94a. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@pr-commenter
Copy link

pr-commenter bot commented Dec 8, 2025

Benchmarks [ tracer ]

Benchmark execution time: 2025-12-17 13:34:10

Comparing candidate commit c4d3680 in PR branch leiyks/feat-upload-junit-report-to-datadog with baseline commit 867b36c in branch master.

Found 3 performance improvements and 3 performance regressions! Performance is the same for 187 metrics, 1 unstable metrics.

scenario:MessagePackSerializationBench/benchMessagePackSerialization

  • 🟩 execution_time [-5.933µs; -4.367µs] or [-5.315%; -3.912%]

scenario:MessagePackSerializationBench/benchMessagePackSerialization-opcache

  • 🟩 execution_time [-4.416µs; -2.264µs] or [-3.920%; -2.010%]

scenario:PHPRedisBench/benchRedisBaseline

  • 🟥 execution_time [+5.685µs; +6.928µs] or [+4.213%; +5.134%]

scenario:SamplingRuleMatchingBench/benchGlobMatching1

  • 🟥 execution_time [+47.311ns; +112.689ns] or [+2.162%; +5.149%]

scenario:SpanBench/benchOpenTelemetryAPI-opcache

  • 🟥 mem_peak [+1.700MB; +1.704MB] or [+4.418%; +4.430%]

scenario:TraceSerializationBench/benchSerializeTrace

  • 🟩 execution_time [-40.634µs; -27.466µs] or [-9.109%; -6.157%]

@Leiyks Leiyks force-pushed the leiyks/feat-upload-junit-report-to-datadog branch 11 times, most recently from b0268f7 to f764fc8 Compare December 15, 2025 13:47
@Leiyks Leiyks force-pushed the leiyks/feat-upload-junit-report-to-datadog branch from f764fc8 to c4d3680 Compare December 17, 2025 12:27
@datadog-official
Copy link

datadog-official bot commented Jan 9, 2026

⚠️ Tests

Fix all issues with Cursor

⚠️ Warnings

🧪 1112 Tests failed

    testSearchPhpBinaries from integration.DDTrace\Tests\Integration\PHPInstallerTest (Fix with Cursor)

    testSimplePushAndProcess from laravel-58-test.DDTrace\Tests\Integrations\Laravel\V5_8\QueueTest (Fix with Cursor)

testSimplePushAndProcess from laravel-8x-test.DDTrace\Tests\Integrations\Laravel\V8_x\QueueTest (Datadog) (Fix with Cursor)
DDTrace\Tests\Integrations\Laravel\V8_x\QueueTest::testSimplePushAndProcess
Test code or tested code printed unexpected output: spanLinksTraceId: 69610a7b000000006f548c63a966e074
tid: 69610a7b00000000
hexProcessTraceId: 6f548c63a966e074
hexProcessSpanId: 4a0031d4d1b213c2
processTraceId: 8022191195925438580
processSpanId: 5332316748927603650
View all

ℹ️ Info

❄️ No new flaky tests detected

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 736b94a | Docs | Datadog PR Page | Was this helpful? Give us feedback!

Leiyks and others added 3 commits January 9, 2026 14:48
Signed-off-by: Alexandre Rulleau <alexandre.rulleau@datadoghq.com>
- Replace absolute file paths with paths relative to the repository root
  before uploading to Datadog
- Add git.repository_url tag pointing to GitHub instead of GitLab to
  ensure Test Optimization features work correctly

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: Alexandre Rulleau <alexandre.rulleau@datadoghq.com>
@Leiyks Leiyks force-pushed the leiyks/feat-upload-junit-report-to-datadog branch from 3bf7006 to 736b94a Compare January 9, 2026 13:48
@Leiyks Leiyks marked this pull request as ready for review January 9, 2026 13:48
@Leiyks Leiyks requested a review from a team as a code owner January 9, 2026 13:48
@Leiyks Leiyks merged commit 3112dff into master Jan 9, 2026
1783 of 1826 checks passed
@Leiyks Leiyks deleted the leiyks/feat-upload-junit-report-to-datadog branch January 9, 2026 14:08
@github-actions github-actions bot added this to the 1.16.0 milestone Jan 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants