From 77d0700a597a73014efe427d300c176a4fff1c44 Mon Sep 17 00:00:00 2001 From: Jackie Han Date: Tue, 9 Jan 2024 15:55:32 -0800 Subject: [PATCH] Require JDK version for java spotless check 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 ac81a3697..f6ef51762 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, 20 ] @@ -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, 20] @@ -87,6 +101,7 @@ jobs: flags: plugin Build-ad-macos: + needs: spotless strategy: matrix: java: [11,17,20]