Run checkstyle as separate CI job on Linux with latest Java #1619
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Run tests | |
| on: [push, pull_request] | |
| permissions: {} | |
| jobs: | |
| test: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| distribution: ['zulu'] | |
| os: [ubuntu-latest, windows-latest, macos-latest] | |
| version: [ 17, 21, 24 ] | |
| steps: | |
| - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | |
| with: | |
| submodules: true | |
| persist-credentials: false | |
| - uses: actions/setup-java@f2beeb24e141e01a676f977032f5a29d81c9e27e # v5.1.0 | |
| with: | |
| distribution: ${{ matrix.distribution }} | |
| java-version: ${{ matrix.version }} | |
| - run: mvn test -B | |
| # This is after the test run to work around | |
| # https://issues.apache.org/jira/projects/MJAVADOC/issues/MJAVADOC-736 | |
| - run: mvn javadoc:javadoc | |
| # Checkstyle 13+ requires Java 21+. Run separately on latest Java. | |
| checkstyle: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | |
| with: | |
| submodules: true | |
| persist-credentials: false | |
| - uses: actions/setup-java@f2beeb24e141e01a676f977032f5a29d81c9e27e # v5.1.0 | |
| with: | |
| distribution: zulu | |
| java-version: 24 | |
| - run: mvn checkstyle:check -B |