Skip to content

Commit cca1d83

Browse files
horghclaude
andcommitted
Skip checkstyle on Java < 21 in CI
Checkstyle 13.0.0 requires Java 21+. Skip checkstyle when running tests on Java 17 since code style is independent of Java version. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent db1c72d commit cca1d83

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

.github/workflows/test.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,15 @@ jobs:
1919
with:
2020
distribution: ${{ matrix.distribution }}
2121
java-version: ${{ matrix.version }}
22-
- run: mvn test -B
22+
# Checkstyle 13+ requires Java 21+. Skip on older JDKs.
23+
- name: Run tests
24+
run: |
25+
if [ "${{ matrix.version }}" -lt 21 ]; then
26+
mvn test -B -Dcheckstyle.skip=true
27+
else
28+
mvn test -B
29+
fi
30+
shell: bash
2331
# This is after the test run to work around
2432
# https://issues.apache.org/jira/projects/MJAVADOC/issues/MJAVADOC-736
2533
- run: mvn javadoc:javadoc

0 commit comments

Comments
 (0)