ci: optimize unit test CI runtime and rename bulk filter - #14029
Draft
lqiu96 wants to merge 13 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
|
|
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.



Description
This PR optimizes CI execution duration and developer build times across the
google-cloud-javamonorepo by compiling generated GAPIC modules without running redundant mock unit tests.Motivation & Context
AppConnectionsServiceClientTest) that test template echo/mock behavior against an in-process dummy server rather than handwritten business logic.java-showcase(showcase.yaml) comprehensively tests the GAPIC generator templates and GAX runtime across all RPC styles, features, and HTTP/JSON transcoding.split-unitstests all handwritten and split libraries (google-auth-library-java,java-storage,java-bigquery,java-spanner,gax-java, etc.).enforcerandgapic-libraries-bomvalidate build integrity and dependency convergence.mvn compile -T 1C) reduces full-repo validation to ~2 minutes.Summary of Changes
google-cloud-jar-parent/pom.xml):<skipUnitTests>true</skipUnitTests>and<maven.test.skip>${skipUnitTests}</maven.test.skip>ingoogle-cloud-jar-parent/pom.xmlso pure GAPIC generated unit tests are skipped by default.java-storage,java-spanner,java-bigquery,java-bigtable,java-firestore,java-pubsub,java-logging,java-datastore,java-dns, etc.) explicitly override<skipUnitTests>false</skipUnitTests>so their unit tests always run.-Penable-integration-testssets<maven.test.skip>false</maven.test.skip>so integration tests continue to run as expected.sdk-platform-java/gapic-generator-java-pom-parent/pom.xml):<skipUnitTests>false</skipUnitTests>so core handwritten modules (gax-java,gapic-generator-java,java-core) always execute their test suites..kokoro/build.sh):JOB_TYPE: test, dynamically selectsMAVEN_GOAL="compile"whenBUILD_SUBDIRis empty (monorepo run), andMAVEN_GOAL="test"whenBUILD_SUBDIRis set (handwritten/split module run).-T 1Cfor parallel CPU core compilation..github/workflows/ci.yaml):units (11),units (17),units (21),units (25),units (26),units (8),windows).bulk-filtertogenerated-libraries-filterfor clarity..kokoro/common.sh):grpc-gcp-javatoalways_install_deps_list.