From 97482c19b0eded34a7f435e589303a834c258aa3 Mon Sep 17 00:00:00 2001 From: Jackie Han Date: Wed, 24 Jan 2024 09:39:55 -0800 Subject: [PATCH] Require JDK version for java spotless check (#1129) Signed-off-by: Jackie Han --- .github/workflows/test_build_multi_platform.yml | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test_build_multi_platform.yml b/.github/workflows/test_build_multi_platform.yml index de5d415da..7456e70a6 100644 --- a/.github/workflows/test_build_multi_platform.yml +++ b/.github/workflows/test_build_multi_platform.yml @@ -13,7 +13,21 @@ jobs: with: product: opensearch + spotless: + if: github.repository == 'opensearch-project/anomaly-detection' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + # Spotless requires JDK 17+ + - uses: actions/setup-java@v4 + with: + java-version: 17 + distribution: temurin + - name: Spotless Check + run: ./gradlew spotlessCheck + Build-ad-windows: + needs: spotless strategy: matrix: java: [ 11, 17, 21 ] @@ -46,7 +60,7 @@ jobs: flags: plugin Build-ad-linux: - needs: Get-CI-Image-Tag + needs: [Get-CI-Image-Tag, spotless] strategy: matrix: java: [11, 17, 21] @@ -87,6 +101,7 @@ jobs: flags: plugin Build-ad-macos: + needs: spotless strategy: matrix: java: [11,17,21]