-
Notifications
You must be signed in to change notification settings - Fork 861
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
Skip spotless and other checks in CI test step #8142
Conversation
// since we are splitting these tasks across different github action jobs | ||
val enabled = testPartitionCounter++ % 4 == testPartition | ||
if (enabled) { | ||
tasks.withType<Test>().configureEach { |
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.
Just to make sure: that includes the gradle test suites, right?
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.
It does. For example in https://github.com/open-telemetry/opentelemetry-java-instrumentation/actions/runs/4530824015/jobs/7980235634?pr=8142 when you open Test
step you can see the command line which includes the test tasks passed to gradle. It includes :instrumentation:spring:spring-jms:spring-jms-2.0:javaagent:testReceiveSpansDisabled
which is a test suite.
Definitely one of the risks with this is that it is not straightforward and there is a chance that some test might be never run if this logic turns out to be faulty.
aea023a
to
889ff1a
Compare
var taskPath = task.project.path + ":" + task.name | ||
// smoke tests are run separately | ||
// :instrumentation:test runs all instrumentation tests | ||
if (taskPath != ":smoke-tests:test" && taskPath != ":instrumentation:test") { |
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.
Does anyone use :instrumentation:tests
? (I'd be good with removing it)
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.
Let's remove it 👍
@@ -63,9 +75,8 @@ jobs: | |||
GE_CACHE_PASSWORD: ${{ secrets.GE_CACHE_PASSWORD }} | |||
with: | |||
arguments: > | |||
test |
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.
when we migrated to test suites we stopped running some of the latest deps tests because they now depend on check
instead of test
, that is why this pr also includes some changes to tests
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.
😱 great catch
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.
nice!
Currently we run spotless and other checks for each of the parallel test steps which seems wasteful. Here is an attempt to run only the tests in given partition without any extra checks in the
test
step and run all the checks in thebuild
step.