Skip to content

Commit b26c6c8

Browse files
Require JDK version for java spotless check (#1129) (#1136)
(cherry picked from commit 97482c1) Signed-off-by: Jackie Han <jkhanjob@gmail.com> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent b06717c commit b26c6c8

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

.github/workflows/test_build_multi_platform.yml

+16-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,21 @@ jobs:
1313
with:
1414
product: opensearch
1515

16+
spotless:
17+
if: github.repository == 'opensearch-project/anomaly-detection'
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: actions/checkout@v4
21+
# Spotless requires JDK 17+
22+
- uses: actions/setup-java@v4
23+
with:
24+
java-version: 17
25+
distribution: temurin
26+
- name: Spotless Check
27+
run: ./gradlew spotlessCheck
28+
1629
Build-ad-windows:
30+
needs: spotless
1731
strategy:
1832
matrix:
1933
java: [ 11, 17, 21 ]
@@ -46,7 +60,7 @@ jobs:
4660
flags: plugin
4761

4862
Build-ad-linux:
49-
needs: Get-CI-Image-Tag
63+
needs: [Get-CI-Image-Tag, spotless]
5064
strategy:
5165
matrix:
5266
java: [11, 17, 21]
@@ -87,6 +101,7 @@ jobs:
87101
flags: plugin
88102

89103
Build-ad-macos:
104+
needs: spotless
90105
strategy:
91106
matrix:
92107
java: [11,17,21]

0 commit comments

Comments
 (0)