Skip to content

Commit c2ab582

Browse files
authored
chore: add jdk 8 verification to showcase CI (#3735)
1 parent 1eb107d commit c2ab582

File tree

1 file changed

+56
-0
lines changed

1 file changed

+56
-0
lines changed

.github/workflows/ci.yaml

+56
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,62 @@ jobs:
213213
# testlib modules of gax
214214
run: mvn package clirr:check -DskipTests -Dfmt.skip
215215

216+
build-java8-showcase:
217+
name: "build(8) for showcase"
218+
runs-on: ubuntu-22.04
219+
steps:
220+
- uses: actions/checkout@v4
221+
- uses: actions/setup-java@v4
222+
with:
223+
java-version: 11
224+
distribution: temurin
225+
cache: maven
226+
- name: Install all modules using Java 11
227+
shell: bash
228+
run: |
229+
mvn install -B -ntp -DskipTests -Dclirr.skip -Dcheckstyle.skip -Dfmt.skip
230+
- uses: actions/setup-java@v3
231+
with:
232+
java-version: 8
233+
distribution: temurin
234+
- run: java -version
235+
- name: Parse showcase version
236+
working-directory: java-showcase/gapic-showcase
237+
run: echo "SHOWCASE_VERSION=$(mvn help:evaluate -Dexpression=gapic-showcase.version -q -DforceStdout)" >> "$GITHUB_ENV"
238+
- name: Install showcase server
239+
run: |
240+
sudo mkdir -p /usr/src/showcase
241+
sudo chown -R ${USER} /usr/src/
242+
curl --location https://github.com/googleapis/gapic-showcase/releases/download/v${{env.SHOWCASE_VERSION}}/gapic-showcase-${{env.SHOWCASE_VERSION}}-linux-amd64.tar.gz --output /usr/src/showcase/showcase-${{env.SHOWCASE_VERSION}}-linux-amd64.tar.gz
243+
cd /usr/src/showcase/
244+
tar -xf showcase-*
245+
./gapic-showcase run &
246+
cd -
247+
- name: Showcase integration tests
248+
working-directory: java-showcase
249+
run: |
250+
mvn verify \
251+
-P enable-integration-tests \
252+
--batch-mode \
253+
--no-transfer-progress
254+
# The `slf4j1_logback` profile brings logging dependency and compiles logging tests, require env var to be set
255+
- name: Showcase integration tests - Logging SLF4J 1.x
256+
working-directory: java-showcase
257+
run: |
258+
mvn clean verify -P '!showcase,enable-integration-tests,loggingTestBase,slf4j1_logback' \
259+
--batch-mode \
260+
--no-transfer-progress
261+
# Set the Env Var for this step only
262+
env:
263+
GOOGLE_SDK_JAVA_LOGGING: true
264+
# The `disabledLogging` profile tests logging disabled when logging dependency present,
265+
# do not set env var for this step
266+
- name: Showcase integration tests - Logging disabed
267+
working-directory: java-showcase
268+
run: |
269+
mvn clean verify -P '!showcase,enable-integration-tests,loggingTestBase,disabledLogging' \
270+
--batch-mode \
271+
--no-transfer-progress
216272
showcase:
217273
runs-on: ubuntu-22.04
218274
strategy:

0 commit comments

Comments
 (0)