-
Notifications
You must be signed in to change notification settings - Fork 24
58 lines (46 loc) · 1.29 KB
/
push.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: build
on:
pull_request:
types: [opened, synchronize]
merge_group:
types: [checks_requested]
jobs:
fmt:
runs-on: ubuntu-latest
steps:
- name: Set up JDK 8
uses: actions/setup-java@v1
with:
java-version: 8
- name: Checkout
uses: actions/checkout@v2
- name: Cache Maven packages
uses: actions/cache@v2
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Check formatting
run: mvn --errors spotless:check
unit-tests:
strategy:
fail-fast: false
matrix:
os: [macos-latest, ubuntu-latest]
java-version: [8, 11, 17, 20] # 20 is the latest version as of 2023 and 17 is the latest LTS
runs-on: ${{ matrix.os }}
steps:
- name: Set up JDK
uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java-version }}
- name: Checkout
uses: actions/checkout@v2
- name: Cache Maven packages
uses: actions/cache@v2
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Check Unit Tests
run: mvn --errors test