This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-03-16
Channels
- # aleph (1)
- # announcements (16)
- # babashka (36)
- # beginners (62)
- # calva (15)
- # cider (21)
- # cljsrn (5)
- # clojure (84)
- # clojure-dev (3)
- # clojure-europe (22)
- # clojure-italy (2)
- # clojure-nl (2)
- # clojure-uk (3)
- # clojurescript (36)
- # core-async (2)
- # cursive (4)
- # datomic (8)
- # emacs (14)
- # events (1)
- # fulcro (4)
- # hyperfiddle (6)
- # introduce-yourself (3)
- # jobs (1)
- # leiningen (4)
- # lsp (100)
- # nrepl (3)
- # off-topic (36)
- # pathom (17)
- # podcasts-discuss (1)
- # polylith (4)
- # portal (14)
- # react (1)
- # reagent (3)
- # reitit (8)
- # releases (3)
- # remote-jobs (1)
- # reveal (7)
- # shadow-cljs (19)
- # sql (16)
- # web-security (3)
Does anyone know how to https://github.com/actions/cache`lein deps` in github workflows? I have the following as my github workflow, but I’m getting cache not found in github actions:
name: Run Tests
on:
push:
jobs:
test:
runs-on: ${{ matrix.os }}
name: Node ${{ matrix.node }} | OS ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-18.04]
node: [12.x]
steps:
- uses: actions/[email protected]
- uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}
- name: Cache Deps
id: cache-deps
uses: actions/cache@v1
with:
path: /root/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('project.clj') }}
- name: Runs Elasticsearch
uses: elastic/elastic-github-actions/elasticsearch@master
with:
stack-version: 7.6.0
- name: Install dependencies
run: lein deps
if: steps.cache-deps.outputs.cache-hit != 'true'
This is what I get in subsequent deployments:
Run actions/cache@v1
with:
path: /root/.m2/repository
key: Linux-maven-5360f82c800957116727d834bd0b32bcbfce17a5c94f606864cfae4990bf344f
Cache not found for input keys: Linux-maven-5360f82c800957116727d834bd0b32bcbfce17a5c94f606864cfae4990bf344f.
Your cache step is much the same as ours, but we have ~/.m2/repository
for the path. Don't know if that makes any difference. Have you checked your action logs to see that it is populating the cache?
I don’t know what logs to look at, but I do see a “Post Cache Deps” with:
Post job cleanup.
Warning: Cache already exists. Scope: refs/heads/prit/cache-lein-deps, Key: Linux-maven-5360f82c800957116727d834bd0b32bcbfce17a5c94f606864cfae4990bf344f, Version: (null)
changing to ~/ worked