diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c6422e9..64a7907 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -13,9 +13,22 @@ jobs: steps: - uses: actions/checkout@v4 with: - submodules: 'recursive' - - uses: cachix/install-nix-action@v26 - - uses: DeterminateSystems/magic-nix-cache-action@v4 + submodules: "recursive" + - uses: nixbuild/nix-quick-install-action@8505cd40ae3d4791ca658f2697c5767212e5ce71 # v30 + with: + nix_conf: | + keep-env-derivations = true + keep-outputs = true + - name: Nix cache + uses: nix-community/cache-nix-action@135667ec418502fa5a3598af6fb9eb733888ce6a # v6 + with: + # restore and save a cache using this key. + primary-key: nix-${{ runner.os }}-${{ hashFiles('**/*.nix', '**/flake.lock') }} + # if there's no cache hit, restore a cache by this prefix. + restore-prefixes-first-match: nix-${{ runner.os }}- + # collect garbage until the Nix store size (in bytes) is at most this number + # before trying to save a new cache. + gc-max-store-size-linux: 2G - name: Ensure flake.lock was committed run: ls flake.lock - run: nix flake check -L