-
Notifications
You must be signed in to change notification settings - Fork 75
40 lines (40 loc) · 1.03 KB
/
java.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: Java CI
on:
push:
branches:
- develop
pull_request:
branches:
- develop
jobs:
build:
name: ${{ matrix.version }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
version: [17, 21]
os: [macos-latest, windows-latest, ubuntu-latest]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Cache JVM
id: cache-java
uses: actions/cache@v3
with:
path: |
${{ runner.temp }}/java_package.tar.gz
~/.m2/repository
key: ${{ runner.os }}-java-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-java-
- name: Setup Java
uses: actions/setup-java@v2
with:
distribution: 'temurin'
java-version: ${{ matrix.version }}
- name: Run tests (UNIX)
run: ./mvnw clean verify
if: runner.os != 'Windows'
- name: Run tests (Windows)
run: .\mvnw.cmd clean verify
if: runner.os == 'Windows'