Use magic nix cache and nix develop command in CI #14
This file contains 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: test | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
jobs: | |
test: | |
timeout-minutes: 15 | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Nix | |
uses: DeterminateSystems/nix-installer-action@v9 | |
- name: Run the Magic Nix Cache | |
uses: DeterminateSystems/magic-nix-cache-action@v2 | |
- name: Cache Clojure dependencies | |
uses: actions/cache@v3 | |
with: | |
key: clj-${{ github.repository }}-${{ hashFiles('**/deps.edn') }} | |
restore-keys: clj-${{ github.repository }}- | |
path: | | |
~/.gitlibs | |
~/.m2/repository | |
- name: Run tests | |
run: nix develop -c clj -T:build ci :snapshot true |