Skip to content

Commit 6df0109

Browse files
committed
ci: clean up sdk-platform-java test names
1 parent b974740 commit 6df0109

1 file changed

Lines changed: 19 additions & 54 deletions

File tree

.github/workflows/sdk-platform-java-ci.yaml

Lines changed: 19 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ on:
33
branches:
44
- main
55
pull_request:
6-
name: sdk-platform-java-ci
6+
name: sdk-platform-java
77
jobs:
88
filter:
99
runs-on: ubuntu-latest
@@ -18,8 +18,8 @@ jobs:
1818
library:
1919
- 'sdk-platform-java/**'
2020
- 'google-auth-library-java/**'
21-
- '.github/workflows/ci.yaml'
22-
build:
21+
- '.github/workflows/sdk-platform-java-ci.yaml'
22+
sdk-platform-java:
2323
needs: filter
2424
if: ${{ needs.filter.outputs.library == 'true' }}
2525
runs-on: ubuntu-22.04
@@ -79,58 +79,20 @@ jobs:
7979
pushd /tmp/java-compute/google-cloud-compute-small-v1-java
8080
./gradlew clean build publishToMavenLocal sourcesJar allJars
8181
popd
82-
build-java-21:
82+
build-java-21-25:
8383
needs: filter
8484
if: ${{ needs.filter.outputs.library == 'true' }}
85-
name: "build(21) except self-service clients"
85+
name: "sdk-platform-java except self-service clients"
8686
# Support for Java 21 is available for all use cases except self-service clients.
8787
runs-on: ubuntu-22.04
88+
strategy:
89+
matrix:
90+
java: [ 21, 25 ]
8891
steps:
8992
- uses: actions/checkout@v4
9093
- uses: actions/setup-java@v4
9194
with:
92-
java-version: 21
93-
distribution: temurin
94-
cache: maven
95-
- run: java -version
96-
- name: Unit Tests
97-
shell: bash
98-
run: .kokoro/build.sh
99-
env:
100-
BUILD_SUBDIR: sdk-platform-java
101-
JOB_TYPE: test
102-
# The `envVarTest` profile runs tests that require an environment variable
103-
- name: Env Var Tests
104-
shell: bash
105-
run: .kokoro/build.sh
106-
env:
107-
BUILD_SUBDIR: sdk-platform-java
108-
JOB_TYPE: test
109-
SUREFIRE_JVM_OPT: '-PenvVarTest'
110-
GOOGLE_CLOUD_UNIVERSE_DOMAIN: random.com
111-
GOOGLE_CLOUD_ENABLE_DIRECT_PATH_XDS: true
112-
GOOGLE_SDK_JAVA_LOGGING: true
113-
- run: bazelisk version
114-
- name: Install all modules using Java 11
115-
shell: bash
116-
run: .kokoro/build.sh
117-
env:
118-
BUILD_SUBDIR: sdk-platform-java
119-
JOB_TYPE: install
120-
- name: Integration Tests
121-
run: |
122-
bazelisk --batch test //sdk-platform-java/test/integration/...
123-
build-java-25:
124-
needs: filter
125-
if: ${{ needs.filter.outputs.library == 'true' }}
126-
name: "build(25) except self-service clients"
127-
# Support for Java 25 is available for all use cases except self-service clients.
128-
runs-on: ubuntu-22.04
129-
steps:
130-
- uses: actions/checkout@v4
131-
- uses: actions/setup-java@v4
132-
with:
133-
java-version: 25
95+
java-version: ${{ matrix.java }}
13496
distribution: temurin
13597
cache: maven
13698
- run: java -version
@@ -152,20 +114,23 @@ jobs:
152114
GOOGLE_CLOUD_ENABLE_DIRECT_PATH_XDS: true
153115
GOOGLE_SDK_JAVA_LOGGING: true
154116
- run: bazelisk version
155-
- name: Install all modules using Java 11
117+
- name: Install all modules
156118
shell: bash
157119
run: .kokoro/build.sh
158120
env:
159121
BUILD_SUBDIR: sdk-platform-java
160122
JOB_TYPE: install
123+
- name: Conditionally set jvmopts
124+
if: ${{ matrix.java == 25 }}
125+
run: echo "EXTRA_BAZEL_ARGS='--jvmopt=-Dcom.google.testing.junit.runner.shouldInstallTestSecurityManager=false'" >> $GITHUB_ENV
161126
- name: Integration Tests
162-
# note need to set shouldInstallTestSecurityManager=false due to https://github.com/bazelbuild/bazel/issues/24354
163127
run: |
164-
bazelisk --batch test //sdk-platform-java/test/integration/... --jvmopt=-Dcom.google.testing.junit.runner.shouldInstallTestSecurityManager=false
165-
build-java8-except-gapic-generator-java:
128+
bazelisk --batch test //sdk-platform-java/test/integration/... ${EXTRA_BAZEL_ARGS}
129+
130+
sdk-platform-java-8:
166131
needs: filter
167132
if: ${{ needs.filter.outputs.library == 'true' }}
168-
name: "build(8) except for gapic-generator-java"
133+
name: "sdk-platform-java except gapic-generator-java (8)"
169134
runs-on: ubuntu-22.04
170135
steps:
171136
- uses: actions/checkout@v4
@@ -217,10 +182,10 @@ jobs:
217182
GOOGLE_SDK_JAVA_LOGGING: true
218183
working-directory: sdk-platform-java
219184

220-
build-java8-gapic-generator-java:
185+
gapic-generator-java:
221186
needs: filter
222187
if: ${{ needs.filter.outputs.library == 'true' }}
223-
name: "build(8) for gapic-generator-java"
188+
name: "gapic-generator-java (8)"
224189
runs-on: ubuntu-22.04
225190
steps:
226191
- uses: actions/checkout@v4

0 commit comments

Comments
 (0)