Skip to content

chore: add jdk 8 verification to showcase CI #3735

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
56 changes: 56 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,62 @@ jobs:
# testlib modules of gax
run: mvn package clirr:check -DskipTests -Dfmt.skip

build-java8-showcase:
name: "build(8) for showcase"
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
java-version: 11
distribution: temurin
cache: maven
- name: Install all modules using Java 11
shell: bash
run: |
mvn install -B -ntp -DskipTests -Dclirr.skip -Dcheckstyle.skip -Dfmt.skip
- uses: actions/setup-java@v3
with:
java-version: 8
distribution: temurin
- run: java -version
- name: Parse showcase version
working-directory: java-showcase/gapic-showcase
run: echo "SHOWCASE_VERSION=$(mvn help:evaluate -Dexpression=gapic-showcase.version -q -DforceStdout)" >> "$GITHUB_ENV"
- name: Install showcase server
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Downloading showcase server should ideally only happen once, but I guess that may require this to be merged with the regular showcase tests. Is there a way for two CI jobs to share the same set up?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm true, from looking at the logs, I think this step gets repeated even when we have a matrix. Haven't tried this out yet but we could have a separate job that does the download once and caches the showcase path. All the other showcase jobs would be dependent on this job. wdyt?

However, this may lead to the "download" job showing on the CI.

run: |
sudo mkdir -p /usr/src/showcase
sudo chown -R ${USER} /usr/src/
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
cd /usr/src/showcase/
tar -xf showcase-*
./gapic-showcase run &
cd -
- name: Showcase integration tests
working-directory: java-showcase
run: |
mvn verify \
-P enable-integration-tests \
--batch-mode \
--no-transfer-progress
# The `slf4j1_logback` profile brings logging dependency and compiles logging tests, require env var to be set
- name: Showcase integration tests - Logging SLF4J 1.x
working-directory: java-showcase
run: |
mvn clean verify -P '!showcase,enable-integration-tests,loggingTestBase,slf4j1_logback' \
--batch-mode \
--no-transfer-progress
# Set the Env Var for this step only
env:
GOOGLE_SDK_JAVA_LOGGING: true
# The `disabledLogging` profile tests logging disabled when logging dependency present,
# do not set env var for this step
- name: Showcase integration tests - Logging disabed
working-directory: java-showcase
run: |
mvn clean verify -P '!showcase,enable-integration-tests,loggingTestBase,disabledLogging' \
--batch-mode \
--no-transfer-progress
showcase:
runs-on: ubuntu-22.04
strategy:
Expand Down
Loading