diff --git a/.github/workflows/test-and-release.yml b/.github/workflows/test-and-release.yml index b83ef32..434d95a 100644 --- a/.github/workflows/test-and-release.yml +++ b/.github/workflows/test-and-release.yml @@ -12,24 +12,26 @@ jobs: steps: - uses: actions/checkout@v4 - - uses: actions/cache@v3 - id: cache + - 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: ${{ runner.os }}-rate-limit-${{ hashFiles('**/deps.edn') }} - restore-keys: ${{ runner.os }}-rate-limit + key: clj-${{ github.repository }}-${{ hashFiles('**/deps.edn') }} + restore-keys: clj-${{ github.repository }}- path: | ~/.gitlibs - ~/.m2 - - - name: Install Nix - uses: cachix/install-nix-action@v24 - - - run: nix-build + ~/.m2/repository - - run: nix-shell --run "clj -T:build ci :snapshot false" + - name: Run tests + run: nix develop -c clj -T:build ci :snapshot false - name: Deploy release jar - run: nix-shell --run "clojure -T:build deploy :snapshot false" + run: nix develop -c clojure -T:build deploy :snapshot false env: CLOJARS_PASSWORD: ${{secrets.CLOJARS_PASSWORD}} CLOJARS_USERNAME: ${{secrets.CLOJARS_USERNAME}} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 96a3124..5c64b6d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -15,18 +15,20 @@ jobs: steps: - uses: actions/checkout@v4 - - uses: actions/cache@v3 - id: cache + - 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: ${{ runner.os }}-rate-limit-${{ hashFiles('**/deps.edn') }} - restore-keys: ${{ runner.os }}-rate-limit + key: clj-${{ github.repository }}-${{ hashFiles('**/deps.edn') }} + restore-keys: clj-${{ github.repository }}- path: | ~/.gitlibs - ~/.m2 - - - name: Install Nix - uses: cachix/install-nix-action@v24 - - - run: nix-build + ~/.m2/repository - - run: nix-shell --run "clj -T:build ci :snapshot true" + - name: Run tests + run: nix develop -c clj -T:build ci :snapshot true