Skip to content

Fix different version for new setup Java. #29

Fix different version for new setup Java.

Fix different version for new setup Java. #29

Workflow file for this run

name: Test Java 9+ Maven
on: [push, pull_request]
jobs:
matrix_build:
strategy:
matrix:
java-version: [9, 11, 13, 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