-
Notifications
You must be signed in to change notification settings - Fork 3
42 lines (39 loc) · 1.05 KB
/
pull_request.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
name: PR Check
on:
push:
branches:
- main
- 7.[0-9]+.x
paths-ignore:
- 'optaplanner-8-benchmarks/**'
pull_request:
branches:
- main
- 7.[0-9]+.x
paths-ignore:
- 'optaplanner-8-benchmarks/**'
jobs:
pr-check:
name: Java ${{ matrix.java }}
runs-on: ubuntu-latest
strategy:
matrix:
java: [8, 11]
fail-fast: false
steps:
- name: Check out Git repository
uses: actions/checkout@v2
- name: Set up JDK
uses: actions/setup-java@v2
with:
java-version: ${{ matrix.java }}
distribution: adopt
# See https://docs.github.com/en/actions/guides/building-and-testing-java-with-maven#caching-dependencies
- name: Cache Maven packages
uses: actions/cache@v2
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Maven Build using Java ${{ matrix.java-version }}
run: mvn -B --fail-at-end clean install