Skip to content

Commit 5333aca

Browse files
authored
Merge pull request #1432 from yue9944882/github-action-maven-cache
Caching local maven repositories for github action jobs to reduce flakiness
2 parents 0ba02a3 + afa92a1 commit 5333aca

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

.github/workflows/maven.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,13 @@ jobs:
3434
uses: actions/setup-java@v1
3535
with:
3636
java-version: ${{ matrix.java }}
37+
- name: Cache local Maven repository
38+
uses: actions/cache@v2
39+
with:
40+
path: ~/.m2/repository
41+
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
42+
restore-keys: |
43+
${{ runner.os }}-maven-
3744
- name: Build with Maven
3845
run: mvn -q test -B -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
3946
build-graalvm:

0 commit comments

Comments
 (0)