Skip to content

Commit a20dc09

Browse files
committed
ci: adds cache and build on PR
1 parent 0e226fd commit a20dc09

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

.github/workflows/build.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Java CI
22

3-
on: [push]
3+
on: [push, pull_request]
44

55
jobs:
66
build:
@@ -12,5 +12,13 @@ jobs:
1212
uses: actions/setup-java@v1
1313
with:
1414
java-version: 1.8
15+
- name: Cache Maven packages
16+
uses: actions/cache@v2
17+
with:
18+
path: ~/.m2
19+
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
20+
restore-keys: ${{ runner.os }}-m2
1521
- name: Build with Maven
16-
run: mvn -B package verify --file pom.xml
22+
run: mvn -B package --file pom.xml
23+
24+
# vim: ts=2:sts=2:sw=2:expandtab

0 commit comments

Comments
 (0)