Skip to content

Commit

Permalink
Add caching step sample to README.md (#64)
Browse files Browse the repository at this point in the history
This would be useful to have a snippet rather than searching this somewhere else
  • Loading branch information
zharinov authored Aug 12, 2022
1 parent b5e067f commit 75e4242
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,21 @@ jobs:
cljstyle: 0.15.0 # cljstyle
cmd-exe-workaround: 'latest' # Replaces `clojure` with `deps.clj` on Windows
zprint: 1.2.3 # zprint

# Optional step:
- name: Cache clojure dependencies
uses: actions/cache@v3
with:
path: |
~/.m2/repository
~/.gitlibs
~/.deps.clj
# List all files containing dependencies:
key: cljdeps-${{ hashFiles('deps.edn') }}
# key: cljdeps-${{ hashFiles('deps.edn', 'bb.edn') }}
# key: cljdeps-${{ hashFiles('project.clj') }}
# key: cljdeps-${{ hashFiles('build.boot') }}
restore-keys: cljdeps-

- name: Execute clojure code
run: clojure -e "(+ 1 1)"
Expand Down

0 comments on commit 75e4242

Please sign in to comment.