From 3e51c2861d415972083842fc826be65f9a0f432b Mon Sep 17 00:00:00 2001 From: Daniel Compton Date: Tue, 27 Aug 2024 18:57:23 +1200 Subject: [PATCH] Add GitHub Actions tests --- .github/workflows/test.yml | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..7fbe1ad --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,37 @@ +name: Test + +on: + workflow_call: + pull_request: + push: + branches: + - 'master' + +jobs: + test: + runs-on: ubuntu-latest + timeout-minutes: 30 + steps: + - name: Install clojure tools + uses: DeLaGuardo/setup-clojure@bc7570e912b028bbcc22f457adec7fdf98e2f4ed # 12.5 + with: + lein: 2.9.1 + + - uses: actions/checkout@v4 + + - name: Cache local Maven repository + uses: actions/cache@v4 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-m2-test-v1-${{ hashFiles('project.clj') }} + restore-keys: | + ${{ runner.os }}-m2-test-v1- + + - name: Prepare java + uses: actions/setup-java@v4 + with: + distribution: 'temurin' + java-version: 21 + + - name: Run tests + run: lein test