Skip to content

Commit a19f6fa

Browse files
authored
Merge pull request #41 from holixon/chore/gha_caching
setup maven cache for GH Actions
2 parents 1666953 + 1b96d31 commit a19f6fa

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

.github/workflows/maven.yml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,25 @@ jobs:
88
strategy:
99
matrix:
1010
java: [ 8, 11 ]
11+
1112
name: Build and tests on JDK ${{ matrix.java }}
13+
1214
steps:
13-
- uses: actions/checkout@v2
14-
- name: Set up JDK
15+
- name: Checkout code
16+
uses: actions/checkout@v2
17+
18+
- name: Set up JDK ${{ matrix.java }}
1519
uses: actions/setup-java@v1
1620
with:
1721
java-version: ${{ matrix.java }}
22+
23+
- name: Cache .m2
24+
uses: actions/cache@v1
25+
with:
26+
path: ~/.m2/repository
27+
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
28+
restore-keys: |
29+
${{ runner.os }}-maven
30+
1831
- name: Build and verify
1932
run: mvn clean verify

0 commit comments

Comments
 (0)