Skip to content

Commit 6b8e3ca

Browse files
committed
regroup sdk-platform-java tests
1 parent 0d69384 commit 6b8e3ca

1 file changed

Lines changed: 77 additions & 78 deletions

File tree

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

Lines changed: 77 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,14 @@ jobs:
1919
- 'sdk-platform-java/**'
2020
- 'google-auth-library-java/**'
2121
- '.github/workflows/sdk-platform-java-ci.yaml'
22-
sdk-platform-java:
22+
units:
2323
needs: filter
2424
if: ${{ needs.filter.outputs.library == 'true' }}
2525
runs-on: ubuntu-22.04
26+
name: sdk-platform-java units
2627
strategy:
2728
matrix:
28-
java: [ 11, 17 ]
29+
java: [ 11, 17, 21, 25 ]
2930
steps:
3031
- uses: actions/checkout@v4
3132
- uses: actions/setup-java@v4
@@ -51,86 +52,11 @@ jobs:
5152
GOOGLE_CLOUD_ENABLE_DIRECT_PATH_XDS: true
5253
GOOGLE_SDK_JAVA_LOGGING: true
5354
working-directory: sdk-platform-java
54-
- run: bazelisk version
55-
- name: Install all modules using Java 11
56-
shell: bash
57-
run: .kokoro/build.sh
58-
env:
59-
BUILD_SUBDIR: sdk-platform-java
60-
JOB_TYPE: install
61-
- name: Integration Tests
62-
run: |
63-
bazelisk --batch test //sdk-platform-java/test/integration/...
64-
- name: Gradle Build Generated Storage Client Library
65-
run: |
66-
echo "Building Storage lib from generated source..."
67-
mkdir /tmp/java-storage
68-
bazelisk --batch build @com_google_googleapis//google/storage/v2:google-cloud-storage-v2-java
69-
tar zxvf bazel-bin/external/com_google_googleapis/google/storage/v2/google-cloud-storage-v2-java.tar.gz -C /tmp/java-storage
70-
pushd /tmp/java-storage/google-cloud-storage-v2-java
71-
./gradlew clean build publishToMavenLocal sourcesJar allJars
72-
popd
73-
- name: Gradle Build Generated Compute Client Library
74-
run: |
75-
echo "Building Compute lib from generated source..."
76-
mkdir /tmp/java-compute
77-
bazelisk --batch build @com_google_googleapis//google/cloud/compute/v1small:google-cloud-compute-small-v1-java
78-
tar zxvf bazel-bin/external/com_google_googleapis/google/cloud/compute/v1small/google-cloud-compute-small-v1-java.tar.gz -C /tmp/java-compute
79-
pushd /tmp/java-compute/google-cloud-compute-small-v1-java
80-
./gradlew clean build publishToMavenLocal sourcesJar allJars
81-
popd
82-
build-java-21-25:
83-
needs: filter
84-
if: ${{ needs.filter.outputs.library == 'true' }}
85-
name: "sdk-platform-java except self-service clients"
86-
# Support for Java 21 is available for all use cases except self-service clients.
87-
runs-on: ubuntu-22.04
88-
strategy:
89-
matrix:
90-
java: [ 21, 25 ]
91-
steps:
92-
- uses: actions/checkout@v4
93-
- uses: actions/setup-java@v4
94-
with:
95-
java-version: ${{ matrix.java }}
96-
distribution: temurin
97-
cache: maven
98-
- run: java -version
99-
- name: Unit Tests
100-
shell: bash
101-
run: .kokoro/build.sh
102-
env:
103-
BUILD_SUBDIR: sdk-platform-java
104-
JOB_TYPE: test
105-
# The `envVarTest` profile runs tests that require an environment variable
106-
- name: Env Var Tests
107-
shell: bash
108-
run: .kokoro/build.sh
109-
env:
110-
BUILD_SUBDIR: sdk-platform-java
111-
JOB_TYPE: test
112-
SUREFIRE_JVM_OPT: '-PenvVarTest'
113-
GOOGLE_CLOUD_UNIVERSE_DOMAIN: random.com
114-
GOOGLE_CLOUD_ENABLE_DIRECT_PATH_XDS: true
115-
GOOGLE_SDK_JAVA_LOGGING: true
116-
- run: bazelisk version
117-
- name: Install all modules
118-
shell: bash
119-
run: .kokoro/build.sh
120-
env:
121-
BUILD_SUBDIR: sdk-platform-java
122-
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
126-
- name: Integration Tests
127-
run: |
128-
bazelisk --batch test //sdk-platform-java/test/integration/... "${EXTRA_BAZEL_ARGS[@]}"
12955

13056
sdk-platform-java-8:
13157
needs: filter
13258
if: ${{ needs.filter.outputs.library == 'true' }}
133-
name: "sdk-platform-java except gapic-generator-java (8)"
59+
name: "sdk-platform-java units (8)"
13460
runs-on: ubuntu-22.04
13561
steps:
13662
- uses: actions/checkout@v4
@@ -182,6 +108,79 @@ jobs:
182108
GOOGLE_SDK_JAVA_LOGGING: true
183109
working-directory: sdk-platform-java
184110

111+
bazel:
112+
needs: filter
113+
if: ${{ needs.filter.outputs.library == 'true' }}
114+
runs-on: ubuntu-22.04
115+
name: sdk-platform-java integration
116+
strategy:
117+
matrix:
118+
java: [ 11, 17, 21 ]
119+
steps:
120+
- run: bazelisk version
121+
- name: Install all modules using Java 11
122+
shell: bash
123+
run: .kokoro/build.sh
124+
env:
125+
BUILD_SUBDIR: sdk-platform-java
126+
JOB_TYPE: install
127+
- name: Integration Tests
128+
run: |
129+
bazelisk --batch test //sdk-platform-java/test/integration/...
130+
131+
bazel-25:
132+
needs: filter
133+
if: ${{ needs.filter.outputs.library == 'true' }}
134+
runs-on: ubuntu-22.04
135+
name: sdk-platform-java integration (25)
136+
steps:
137+
- run: bazelisk version
138+
- name: Install all modules using Java 11
139+
shell: bash
140+
run: .kokoro/build.sh
141+
env:
142+
BUILD_SUBDIR: sdk-platform-java
143+
JOB_TYPE: install
144+
- name: Integration Tests
145+
run: |
146+
bazelisk --batch test //sdk-platform-java/test/integration/... --jvmopt=-Dcom.google.testing.junit.runner.shouldInstallTestSecurityManager=false
147+
148+
self-service:
149+
needs: filter
150+
if: ${{ needs.filter.outputs.library == 'true' }}
151+
runs-on: ubuntu-22.04
152+
name: sdk-platform-java integration
153+
strategy:
154+
matrix:
155+
java: [ 11, 17 ]
156+
steps:
157+
- run: bazelisk version
158+
- name: Install all modules using Java 11
159+
shell: bash
160+
run: .kokoro/build.sh
161+
env:
162+
BUILD_SUBDIR: sdk-platform-java
163+
JOB_TYPE: install
164+
- name: Gradle Build Generated Storage Client Library
165+
run: |
166+
echo "Building Storage lib from generated source..."
167+
mkdir /tmp/java-storage
168+
bazelisk --batch build @com_google_googleapis//google/storage/v2:google-cloud-storage-v2-java
169+
tar zxvf bazel-bin/external/com_google_googleapis/google/storage/v2/google-cloud-storage-v2-java.tar.gz -C /tmp/java-storage
170+
pushd /tmp/java-storage/google-cloud-storage-v2-java
171+
./gradlew clean build publishToMavenLocal sourcesJar allJars
172+
popd
173+
- name: Gradle Build Generated Compute Client Library
174+
run: |
175+
echo "Building Compute lib from generated source..."
176+
mkdir /tmp/java-compute
177+
bazelisk --batch build @com_google_googleapis//google/cloud/compute/v1small:google-cloud-compute-small-v1-java
178+
tar zxvf bazel-bin/external/com_google_googleapis/google/cloud/compute/v1small/google-cloud-compute-small-v1-java.tar.gz -C /tmp/java-compute
179+
pushd /tmp/java-compute/google-cloud-compute-small-v1-java
180+
./gradlew clean build publishToMavenLocal sourcesJar allJars
181+
popd
182+
183+
185184
gapic-generator-java:
186185
needs: filter
187186
if: ${{ needs.filter.outputs.library == 'true' }}

0 commit comments

Comments
 (0)