From 27c191e3c4bdda58fc009170d8ef044de26e3e63 Mon Sep 17 00:00:00 2001 From: Ambrose Bonnaire-Sergeant Date: Thu, 1 May 2025 01:30:43 +0000 Subject: [PATCH] add CI tests --- .github/workflows/test.yml | 47 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 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..ab5893a --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,47 @@ +name: Run tests + +on: + push: + branches: [master] + tags: + - 'v[0-9]+.[0-9]+.[0-9]+*' + pull_request: + branches: [master] + +env: + # increment to clear caches + ACTIONS_CACHE_VERSION: 'v1' + +jobs: + test: + strategy: + matrix: + jdk: [21] + + name: Test + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Setup Java ${{ matrix.jdk }} + uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: ${{ matrix.jdk }} + - uses: actions/cache@v4 + with: + path: | + ~/.m2/repository + ~/.gitlibs + ~/.deps.clj + key: clojuredeps-${{ env.ACTION_CACHE_VERSION }}-${{ hashFiles('deps.edn', 'bb.edn') }} + restore-keys: | + clojuredeps-${{ env.ACTION_CACHE_VERSION }}- + - name: Setup Clojure and Babashka + uses: DeLaGuardo/setup-clojure@master + with: + cli: latest + bb: latest + - name: Run tests + run: bb test