Fix deprecation in Java 17. #31
This file contains 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: Test Java 9+ Maven | |
on: [push, pull_request] | |
jobs: | |
matrix_build: | |
strategy: | |
matrix: | |
java-version: [11, 17, 21] | |
name: Test with Java ${{ matrix.java-version }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out the repo | |
uses: actions/checkout@v3 | |
- name: Set up JDK ${{ matrix.java-version }} | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'adopt' | |
java-version: ${{ matrix.java-version }} | |
- name: Cache Maven packages | |
uses: actions/cache@v3 | |
with: | |
path: ~/.m2 | |
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | |
restore-keys: ${{ runner.os }}-m2 | |
- name: Test with Maven | |
run: mvn -Djava.version=${{ matrix.java-version }} -B clean test | |
- name: Run system tests | |
run: mvn -Djava.version=${{ matrix.java-version }} -B failsafe:integration-test failsafe:verify | |