Set up GitHub actions maven workflow (#1454)

This commit is contained in:
Erik 2021-07-12 19:02:06 +02:00 committed by GitHub
parent 528f9f9777
commit 5a9a71f48a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

32
.github/workflows/ci.yml vendored Normal file
View File

@ -0,0 +1,32 @@
name: CI
on:
push:
branches:
- main
pull_request:
jobs:
test:
name: "Test on JDK ${{ matrix.java }}"
runs-on: ubuntu-latest
strategy:
matrix:
java: [ 8, 11, 16 ]
steps:
- name: "Checkout"
uses: actions/checkout@v2
- name: "Set up JDK ${{ matrix.java }}"
uses: actions/setup-java@v2
with:
java-version: ${{ matrix.java }}
distribution: adopt
- name: "Cache local Maven repository"
uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: "Test"
run: mvn --batch-mode verify