ci: upgrade actions/cache from v3 to v4 - #565
Conversation
There was a problem hiding this comment.
Pull Request Overview
Upgrade GitHub Actions cache from v3 to v4 in the build workflow to keep CI dependencies current.
- Bump actions/cache to v4 for Maven dependency caching
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| uses: actions/cache@v4 | ||
| with: | ||
| path: ~/.m2/repository | ||
| key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} |
There was a problem hiding this comment.
Pin the action to a specific commit SHA instead of the mutable v4 tag to prevent supply-chain risk and unexpected behavior when the tag is updated. Example: uses: actions/cache@ with an inline comment noting the version.
| uses: actions/cache@v4 | ||
| with: | ||
| path: ~/.m2/repository | ||
| key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} |
There was a problem hiding this comment.
Add restore-keys to improve cache reuse when pom.xml changes, reducing cold builds. For example: restore-keys: | (newline) ${{ runner.os }}-maven-
| distribution: temurin | ||
| java-version: 21 | ||
| - name: Cache Maven dependencies |
There was a problem hiding this comment.
actions/setup-java supports built-in Maven caching (cache: maven). Enabling it on the setup-java step can simplify the workflow and eliminate the separate actions/cache step.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #565 +/- ##
============================================
+ Coverage 87.69% 89.22% +1.53%
- Complexity 188 204 +16
============================================
Files 51 51
Lines 520 594 +74
Branches 21 21
============================================
+ Hits 456 530 +74
Misses 53 53
Partials 11 11 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Checklist for self review: