diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 98f6e04a1..05593d27a 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -117,3 +117,26 @@ jobs: - run: .kokoro/build.sh env: JOB_TYPE: test + units-java24: + # Building using Java 8 and run the tests with Java 24 runtime + name: "units (24)" + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-java@v3 + with: + java-version: 24 + distribution: temurin + - name: "Set jvm system property environment variable for surefire plugin (unit tests)" + # Maven surefire plugin (unit tests) allows us to specify JVM to run the tests. + # https://maven.apache.org/surefire/maven-surefire-plugin/test-mojo.html#jvm + run: echo "SUREFIRE_JVM_OPT=-Djvm=${JAVA_HOME}/bin/java" >> $GITHUB_ENV + shell: bash + - uses: actions/setup-java@v3 + with: + java-version: 8 + distribution: temurin + - run: .kokoro/install_dependencies.sh + - run: .kokoro/build.sh + env: + JOB_TYPE: test