Update .github/workflows/java-all-versions.yml #11
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: Java 8, 11, 17, 21 CI | |
| on: [ push,pull_request ] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up JDKs 8, 11, 17, 21 | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'temurin' | |
| java-version: | | |
| 8 | |
| 11 | |
| 17 | |
| 21 | |
| - name: Build with Gradle | |
| run: ./gradlew assemble | |
| - name: Test with Java 8 | |
| id: test_java8 | |
| run: ./gradlew test -PtestOnJava=8 --stacktrace | |
| - name: List workspace files | |
| if: always() | |
| run: | | |
| pwd | |
| ls | |
| ls build | |
| ls -lR build/test-results | |
| - uses: actions/upload-artifact@v4 # upload test results if the test was not skipped | |
| if: ${{ !cancelled() && steps.test_java8.outcome != 'skipped'}} | |
| with: | |
| name: test-results-j8 | |
| path: 'build/test-results/**/*.xml' | |
| - name: Test with Java 11 | |
| id: test_java11 | |
| run: ./gradlew test -PtestOnJava=11 --stacktrace | |
| - uses: actions/upload-artifact@v4 # upload test results if the test was not skipped | |
| if: ${{ !cancelled() && steps.test_java1.outcome != 'skipped'}} | |
| with: | |
| name: test-results-j11 | |
| path: 'test-results/**/*.xml' | |
| - name: Test with Java 17 | |
| id: test_java17 | |
| run: ./gradlew test -PtestOnJava=17 --stacktrace | |
| - uses: actions/upload-artifact@v4 # upload test results if the test was not skipped | |
| if: ${{ !cancelled() && steps.test_java17.outcome != 'skipped'}} | |
| with: | |
| name: test-results-j17 | |
| path: 'test-results/**/*.xml' | |
| - name: Test with Java 21 | |
| id: test_java21 | |
| run: ./gradlew test -PtestOnJava=21 --stacktrace | |
| - uses: actions/upload-artifact@v4 # upload test results if the test was not skipped | |
| if: ${{ !cancelled() && steps.test_java21.outcome != 'skipped'}} | |
| with: | |
| name: test-results-j21 | |
| path: 'test-results/**/*.xml' | |