Skip to content
This repository has been archived by the owner on Aug 30, 2024. It is now read-only.

Commit

Permalink
Improve github action caching
Browse files Browse the repository at this point in the history
Simply cache all of ~/.m2 for both NVD as running tests.
  • Loading branch information
remvee committed Aug 1, 2024
1 parent bc09247 commit b6d9875
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
12 changes: 3 additions & 9 deletions .github/workflows/dependency-vulnerabilities.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,9 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: |
./.m2
# store as today's cache
key: "nvd-clojure-${{ steps.date.outputs.date }}"
# if today's cache does not yet exist, fetch from whatever iss
# the most recent cache for nvd-clojure
# and update that
restore-keys: "nvd-clojure-"
path: "~/.m2"
key: "nvd-${{ steps.date.outputs.date }}"
restore-keys: "nvd-"

- name: Install clj runtime
run: .github/workflows/install-binaries.sh
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,15 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Get current date
id: date
run: echo "date=$(date '+%Y-%m-%d')" >> $GITHUB_OUTPUT

- uses: actions/cache@v4
with:
path: "~/.m2"
key: "deps-${{ hashFiles('deps.edn') }}"
key: "test-${{ steps.date.outputs.date }}"
restore-keys: "test-"

- name: Install packages
run: |
Expand Down

0 comments on commit b6d9875

Please sign in to comment.