Skip to content

Commit 94bfe3c

Browse files
committed
fix(ci): update cache path and add restore keys for Maven dependencies
- Corrected the cache path from `~/.mv2/repository` to `~/.m2/repository` - Added restore keys to improve cache retrieval during CI runs - Included a step to save the cache after dependencies are downloaded
1 parent 5c4f333 commit 94bfe3c

File tree

1 file changed

+31
-21
lines changed

1 file changed

+31
-21
lines changed

.github/workflows/integration.yml

+31-21
Original file line numberDiff line numberDiff line change
@@ -13,24 +13,34 @@ jobs:
1313
runs-on: ${{ matrix.platform }}
1414

1515
steps:
16-
- uses: actions/checkout@v3
17-
- name: cache
18-
uses: actions/cache@v4
19-
with:
20-
path: |
21-
~/.mv2/repository
22-
key: om-${{hashFiles('**/pom.xml')}}
23-
24-
- name: Set up JDK 21
25-
uses: actions/setup-java@v2
26-
with:
27-
java-version: 21
28-
distribution: 'zulu'
29-
- run: mvn dependency:go-offline
30-
- name: Build
31-
run: mvn clean process-test-classes verify
32-
33-
- name: Upload coverage reports to Codecov
34-
uses: codecov/codecov-action@v4.0.1
35-
with:
36-
token: ${{ secrets.CODECOV_TOKEN }}
16+
- uses: actions/checkout@v3
17+
18+
- name: Cache Maven Repository
19+
uses: actions/cache@v4
20+
with:
21+
path: ~/.m2/repository
22+
key: om-${{ hashFiles('**/pom.xml') }}
23+
restore-keys: |
24+
om-
25+
26+
- name: Set up JDK 21
27+
uses: actions/setup-java@v2
28+
with:
29+
java-version: 21
30+
distribution: 'zulu'
31+
32+
- run: mvn dependency:go-offline
33+
34+
- name: Build
35+
run: mvn clean process-test-classes verify
36+
37+
- name: Save Maven Cache
38+
uses: actions/cache@v4
39+
with:
40+
path: ~/.m2/repository
41+
key: om-${{ hashFiles('**/pom.xml') }}
42+
43+
- name: Upload coverage reports to Codecov
44+
uses: codecov/codecov-action@v4.0.1
45+
with:
46+
token: ${{ secrets.CODECOV_TOKEN }}

0 commit comments

Comments
 (0)