From 1fe8d6d438a074ada7f1e7f4728634f6e3bb1f7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Xavier=20L=C3=A9aut=C3=A9?= Date: Wed, 4 Oct 2023 14:30:36 -0700 Subject: [PATCH] use setup-java for unit tests, since Java 21 is not built-in --- .github/workflows/reusable-unit-tests.yml | 7 +++++-- .github/workflows/unit-and-integration-tests-unified.yml | 8 +++++--- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/workflows/reusable-unit-tests.yml b/.github/workflows/reusable-unit-tests.yml index 34d992c397c28..0ba17183f3bca 100644 --- a/.github/workflows/reusable-unit-tests.yml +++ b/.github/workflows/reusable-unit-tests.yml @@ -59,8 +59,11 @@ jobs: with: fetch-depth: 0 - - name: setup jdk${{ inputs.jdk }} - run: echo "JAVA_HOME=$JAVA_HOME_${{ inputs.jdk }}_X64" >> $GITHUB_ENV + - uses: actions/setup-java@v3 + with: + distribution: 'zulu' + java-version: ${{ inputs.jdk }} + cache: 'maven' - name: Restore Maven repository id: maven-restore diff --git a/.github/workflows/unit-and-integration-tests-unified.yml b/.github/workflows/unit-and-integration-tests-unified.yml index 4be748b9fd25d..e28eaa943fbc7 100644 --- a/.github/workflows/unit-and-integration-tests-unified.yml +++ b/.github/workflows/unit-and-integration-tests-unified.yml @@ -62,9 +62,11 @@ jobs: - name: Checkout branch uses: actions/checkout@v3 - - name: setup jdk${{ matrix.jdk }} - run: | - echo "JAVA_HOME=$JAVA_HOME_${{ matrix.jdk }}_X64" >> $GITHUB_ENV + - uses: actions/setup-java@v3 + with: + distribution: 'zulu' + java-version: ${{ matrix.jdk }} + cache: 'maven' - name: Cache Maven m2 repository id: maven