Skip to content

Commit 0bea562

Browse files
authored
Replace actions/cache with built-in cache parameter in setup-java (quick-perf#227)
1 parent 6fc0a54 commit 0bea562

1 file changed

Lines changed: 4 additions & 24 deletions

File tree

.github/workflows/CI.yml

Lines changed: 4 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,7 @@ jobs:
1919
with:
2020
java-version: ${{ matrix.java }}
2121
distribution: temurin
22-
- name: Cache Maven dependencies
23-
uses: actions/cache@v4
24-
with:
25-
path: ~/.m2
26-
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
27-
restore-keys: ${{ runner.os }}-m2
22+
cache: maven
2823
- name: Build with Maven
2924
run: mvn verify
3025

@@ -44,12 +39,7 @@ jobs:
4439
with:
4540
java-version: ${{ matrix.java }}
4641
distribution: temurin
47-
- name: Cache Maven dependencies
48-
uses: actions/cache@v4
49-
with:
50-
path: ~/.m2
51-
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
52-
restore-keys: ${{ runner.os }}-m2
42+
cache: maven
5343
- name: Tests
5444
run: mvn verify
5545

@@ -69,12 +59,7 @@ jobs:
6959
with:
7060
java-version: ${{ matrix.java }}
7161
distribution: temurin
72-
- name: Cache Maven dependencies
73-
uses: actions/cache@v4
74-
with:
75-
path: ~/.m2
76-
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
77-
restore-keys: ${{ runner.os }}-m2
62+
cache: maven
7863
- name: Tests
7964
run: mvn verify
8065

@@ -94,12 +79,7 @@ jobs:
9479
with:
9580
java-version: ${{ matrix.java }}
9681
distribution: temurin
97-
- name: Cache Maven dependencies
98-
uses: actions/cache@v4
99-
with:
100-
path: ~/.m2
101-
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
102-
restore-keys: ${{ runner.os }}-m2
82+
cache: maven
10383
- name: Build
10484
run: mvn install -DskipTests
10585
- name: Tests

0 commit comments

Comments
 (0)