Tests workflow: add dependencies #2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: lein all test | ||
| on: | ||
| push: | ||
| branches: | ||
| - "main" | ||
| pull_request: | ||
| branches: | ||
| - "main" | ||
| jobs: | ||
| build: | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| matrix: | ||
| java-version: [11, 17, 21] | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v5 | ||
| - name: Set up JDK ${{ matrix.java-version }} | ||
| uses: actions/setup-java@v4 | ||
| with: | ||
| java-version: ${{ matrix.java-version }} | ||
| distribution: 'temurin' | ||
| - name: Install clojure tools | ||
| uses: DeLaGuardo/setup-clojure@13.4 | ||
| with: | ||
| lein: 2.11.2 | ||
| - name: Cache dependencies | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: | | ||
| ~/.m2/repository | ||
| ~/.gitlibs | ||
| ~/.deps.clj | ||
| .cpcache | ||
| key: cljdeps-${{ hashFiles('project.clj') }} | ||
| # key: cljdeps-${{ hashFiles('build.boot') }} | ||
| restore-keys: cljdeps- | ||
| - name: Install Leiningen | ||
| run: | | ||
| curl -O https://raw.githubusercontent.com/technomancy/leiningen/stable/bin/lein | ||
| chmod +x lein | ||
| sudo mv lein /usr/local/bin/ | ||
| lein version # This will download Leiningen if not cached | ||
| - name: Install dependencies | ||
| run: lein deps | ||
| - name: Run tests | ||
| run: lein all test | ||