ci: optimize unit test CI runtime and rename bulk filter - #14029
Draft
lqiu96 wants to merge 16 commits into
Draft
Conversation
- Rename bulk-filter to generated-libraries-filter in ci.yaml - Add -T 1C to test execution in build.sh for parallel module builds - Switch from mvn install to mvn test during test execution to prevent redundant re-packaging and re-installation into local maven repository
Contributor
There was a problem hiding this comment.
Code Review
This pull request updates the build script .kokoro/build.sh to run mvn test instead of mvn install and adds the -T 1C flag for parallel execution. The reviewer points out that using mvn test will skip integration tests and verification phases, and suggests using mvn verify instead to ensure all tests are properly executed.
lqiu96
marked this pull request as draft
August 10, 2026 21:22
- Update units, units-8-runtime, and windows jobs to only run on push to main - Keep -T 1C parallel flag and use mvn install in build.sh for full lifecycle compatibility
…it tests - Add compile case in .kokoro/build.sh to run mvn compile with -T 1C - Update units, units-8-runtime, and windows CI jobs to run compile instead of running unit tests - Fix stale bulk-filter references in ci.yaml
- Keep original job names (units (11), units (8), windows, bulk-filter) - Use JOB_TYPE: compile so jobs run fast compilation without renaming GitHub checks
- Rename filter job to generated-libraries-filter for clarity - Preserve required job display names for units, units (8), and windows
- Set JOB_TYPE: test in units, units-8-runtime, and windows to leverage dynamic compile goal in build.sh
- Add ignoredUnusedDeclaredDependency for protobuf-java with combine.children=append in maven-dependency-plugin config - Preserves compile-time classpath required by javac for Struct while satisfying dependency:analyze
- Override skipUnitTests to false in java-logging-logback/pom.xml so test sources compile and run - Enables dependency:analyze to properly recognize test-scoped dependencies in split-dependencies CI
…ptimize_ci_test_duration
- Explicitly set skipUnitTests=false in all handwritten library root POMs - Set skipUnitTests=true in pure generated submodules (firestore-admin, gapic-storage-v2) - Ensures handwritten unit tests run in split-units and dependencies compile in split-dependencies
- Remove maven.test.skip from google-cloud-jar-parent so test classes compile for dependency:analyze and surefire skip handles execution - Add cache: maven to split-dependencies and split-clirr in GitHub Actions workflow - Use mvn test-compile and add -T 1C in dependencies.sh for fast parallel execution
- Add skipUnitTests=false property to native profile in google-cloud-jar-parent and native-image-shared-config - Ensures Surefire executes client tests during native-image builds to generate test configuration required by native-maven-plugin
…ncies - Since test classes are compiled and skipUnitTests=false is set, dependency:analyze recognizes test-scoped usages cleanly without custom ignore rules
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Problem
java-showcase(showcase.yaml), while business logic in handwritten/split libraries is validated in dedicatedsplit-unitsjobs.High-Level Changes
.kokoro/build.sh, dynamically runsmvn compile -T 1Cfor full monorepo CI runs (unitsmatrix jobs), reducing full-repository validation from 40+ minutes to ~2 minutes while keeping all required GitHub status check names.<skipUnitTests>true</skipUnitTests>ingoogle-cloud-jar-parent/pom.xmlto skip surefire execution for generated modules, while preserving test compilation and enabling-PnativeGraalVM test discovery.<skipUnitTests>false</skipUnitTests>on all 18 handwritten/combo library root POMs (java-storage,java-spanner,java-bigquery,java-bigtable,sdk-platform-java, etc.) so all handwritten unit tests continue to run insplit-units.cache: mavento split CI jobs in.github/workflows/ci.yamland multi-threaded execution (-T 1C) in.kokoro/dependencies.sh.