-
Notifications
You must be signed in to change notification settings - Fork 841
Streamline Gradle commands in test jobs #3703
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
Conversation
rename jobs to make it easier to distinguish unit/int test runs
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.
Pull request overview
This PR optimizes Gradle build commands in test scripts and improves GitHub workflow job naming for better clarity. The changes remove redundant Gradle tasks while maintaining correct build dependencies through Gradle's task dependency graph.
Key Changes:
- Streamlined Gradle commands by removing redundant
assembletasks where compilation dependencies handle the requirements - Renamed workflow jobs from generic
container-test-jobto specificdb-unit-testanddb-integration-testfor better identification - Added
cleanto integration test assembly step for consistency
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| scripts/unit_tests.sh | Removed assemble from first Gradle invocation; compileTestJava dependency chain ensures main code compilation |
| scripts/integration_tests.sh | Added clean to assembly command for consistency; removed redundant clean assemble from test compilation step that runs after initial assembly |
| .github/workflows/unit-tests.yml | Renamed job from container-test-job to db-unit-test for clearer identification |
| .github/workflows/integration-tests.yml | Renamed job from container-test-job to db-integration-test to distinguish from unit test job |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Restore the ability to search for " failed" without these extra matches
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.
Pull request overview
Copilot reviewed 4 out of 5 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| -DskipUaaAutoStart=true \ | ||
| --no-daemon \ | ||
| --no-configuration-cache \ | ||
| compileTestJava |
Copilot
AI
Dec 16, 2025
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.
The first compileTestJava command is missing the same memory configuration flags that are present in the second test execution command. This could lead to inconsistent behavior or compilation failures due to insufficient memory allocation. The command should include -Djava.security.egd, -Dorg.gradle.jvmargs, -Dorg.gradle.daemon.idletimeout, -Dorg.gradle.parallel, and -Dorg.gradle.workers.max flags for consistency with the integration test execution step and to prevent potential compilation issues.
| -DskipUaaAutoStart=true \ | |
| --no-daemon \ | |
| --no-configuration-cache \ | |
| compileTestJava | |
| -Djava.security.egd=file:/dev/./urandom \ | |
| -DskipUaaAutoStart=true \ | |
| -Dorg.gradle.jvmargs="-Dfile.encoding=utf8 -Xms64m -Xmx${gradle_test_heap} -XX:MaxMetaspaceSize=128m -XX:+UseG1GC -XX:MaxGCPauseMillis=100 -XX:ParallelGCThreads=2 -XX:CICompilerCount=2 -Djdk.lang.processReaperUseDefaultStackSize=true" \ | |
| -Dorg.gradle.daemon.idletimeout=300000 \ | |
| -Dorg.gradle.parallel=false \ | |
| -Dorg.gradle.workers.max=2 \ | |
| compileTestJava \ | |
| --no-watch-fs \ | |
| --no-daemon \ | |
| --no-configuration-cache \ | |
| --max-workers=2 \ | |
| --stacktrace \ | |
| --console=plain |
| -DskipUaaAutoStart=true \ | ||
| --no-daemon \ | ||
| --no-configuration-cache \ | ||
| compileTestJava |
Copilot
AI
Dec 16, 2025
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.
The clean task was removed from this command but is still present in line 32 of scripts/unit_tests.sh. This inconsistency means integration tests now skip the clean task while unit tests still run it. If this difference is intentional (perhaps because assemble on line 51 already handles cleanup), the behavior should be consistent across both test scripts. Consider either removing clean from unit_tests.sh as well or adding it back here.
| compileTestJava | |
| clean compileTestJava |
| set -x | ||
| echo "$integration_test_code" | ||
| echo "./gradlew \ | ||
| -Dspring.profiles.active=${test_profile} \ |
Copilot
AI
Dec 16, 2025
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.
The variable test_profile is not quoted in this echo statement, which is inconsistent with lines 112, 121, and throughout the rest of the file where it is properly quoted. While this is just echoed output in a non-execution path, consistency in quoting practices helps prevent potential issues if the code is refactored or the variable contains special characters.
| -Dspring.profiles.active=${test_profile} \ | |
| -Dspring.profiles.active=\"${test_profile}\" \ |
also rename jobs to make it easier to distinguish unit/int test runs