From 092bac0d71ce6c0443fcdded653737e06872d7ae Mon Sep 17 00:00:00 2001 From: Pascal Christoph Date: Thu, 9 Jan 2025 16:48:15 +0100 Subject: [PATCH] Provide lein (#188) As github actions complains wth "lein: command not found". Following https://hackeryarn.com/post/clojure-actions/. --- .github/workflows/build.yml | 12 ++++++++++++ .github/workflows/test.yml | 13 +++++++++++++ 2 files changed, 25 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 11b41b9..9593a29 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -34,6 +34,18 @@ jobs: - name: Set up Node.js uses: actions/setup-node@v2 - uses: actions/checkout@v2 + # Setup Leiningen. Also supports setting up other commonly used tools. + - name: Install clojure tools + uses: DeLaGuardo/setup-clojure@12.1 + with: lein: 2.9.1 + # Enable cache so our actions run faster. + - name: Cache clojure dependencies + uses: actions/cache@v3 + with: + path: | + ~/.m2/repository + key: cljdeps-${{ hashFiles('project.clj') }} + restore-keys: cljdeps- - name: Install dependencies run: lein deps - name: Build cljs diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 496d816..fb76769 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -37,6 +37,19 @@ jobs: npm install -g karma-cli export CHROME_BIN='/usr/bin/chromium-browser' - uses: actions/checkout@v2 + # Setup Leiningen. Also supports setting up other commonly used tools. + - name: Install clojure tools + uses: DeLaGuardo/setup-clojure@12.1 + with: lein: 2.9.1 + # Enable cache so our actions run faster. + - name: Cache clojure dependencies + uses: actions/cache@v3 + with: + path: | + ~/.m2/repository + key: cljdeps-${{ hashFiles('project.clj') }} + restore-keys: cljdeps- + - name: Install dependencies run: lein deps