-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[chore] Create gotest-with-junit Makefile target #11963
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #11963 +/- ##
=======================================
Coverage 91.62% 91.62%
=======================================
Files 447 447
Lines 23731 23739 +8
=======================================
+ Hits 21743 21751 +8
Misses 1613 1613
Partials 375 375 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ankitpatel96 can you add more on how you plan to use the artifacts?
Also I wonder if these should be uploaded https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/storing-and-sharing-data-from-a-workflow ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
We get one JUnit file per go module, it should be possible to correlate files with codeowners :)
I've added a test to receiver/xreceiver: func TestFailure(t *testing.T) {
t.Fail()
} Then run the new command and got this XML output: <?xml version="1.0" encoding="UTF-8"?>
<testsuites tests="2" failures="1" errors="0" time="1.835537">
<testsuite tests="2" failures="1" time="0.660000" name="go.opentelemetry.io/collector/receiver/xreceiver" timestamp="2024-12-20T11:01:25-03:00">
<properties>
<property name="go.version" value="go1.23.1 darwin/arm64"></property>
</properties>
<testcase classname="go.opentelemetry.io/collector/receiver/xreceiver" name="TestFailure" time="0.000000">
<failure message="Failed" type="">=== RUN TestFailure
--- FAIL: TestFailure (0.00s)
</failure>
</testcase>
<testcase classname="go.opentelemetry.io/collector/receiver/xreceiver" name="TestNewFactoryWithProfiles" time="0.000000"></testcase>
</testsuite>
</testsuites> From this file I get good information that I can re-use in automation:
Module names can be correlated to the codeowners file so we can ping the relevant people :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, actually there's one thing left to do. We probably want to add the test results path to .gitignore
Great point! Added a comment about how I / our company plans to use them.
Good idea... I will implement that. Even though no one uses these right now the extra time taken should be pretty minimal |
contrib test failures are due to #11932 |
Have to update this - the output path was wrong |
The artifact is basically a zip with the following list of files:
This is ready to be merged |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Re-approving, I am going to merge this since this would also be useful for open-telemetry/opentelemetry-collector-contrib/issues/36761 which has a lot of support
Creates a target to output junit files from testing. This PR also starts to use it in CI - we don't consume the Junits yet but it would be easy to add on. This will be useful for a number of CI/Devx initiatives in the future.
My company, Datadog, plans to use this information to track the build stability of our code in contrib, as well as the stability of code we depend on here in collector.