From 6136aca7ac0922c2da8f127805725e0246c5f405 Mon Sep 17 00:00:00 2001 From: Austin Horstman Date: Mon, 2 Jun 2025 22:29:05 -0500 Subject: [PATCH] ci: use flake lock for tests Ensure we don't have surprise breakages and can test against a specific lock file. Signed-off-by: Austin Horstman (cherry picked from commit ac3c38be05ddb99b5863f5f4a57d24b542a62f30) --- .github/workflows/test.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c6f25cb0..da86b9fa 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -14,6 +14,7 @@ jobs: - uses: actions/checkout@v4 - uses: cachix/install-nix-action@v31 with: + # TODO: Adjust uninstall to not need channel nix_path: nixpkgs=channel:nixos-25.05 extra_nix_config: | experimental-features = nix-command flakes @@ -22,15 +23,15 @@ jobs: echo "Error: literalExample should be replaced by literalExpression" > /dev/stderr exit 1 fi - - run: nix-build --show-trace -A docs.jsonModuleMaintainers + - run: nix build --show-trace .#docs-jsonModuleMaintainers - run: ./format --ci - - run: nix-shell --show-trace . -A install - - run: yes | home-manager -I home-manager=. uninstall + - run: nix run .#home-manager -- init --switch + - run: yes | nix run . -- uninstall - name: Run tests - run: nix-build -j auto --show-trace --arg enableBig false --pure --option allow-import-from-derivation false tests -A build.all + run: nix build -j auto --show-trace --option allow-import-from-derivation false --reference-lock-file flake.lock "./tests#test-all-no-big" env: GC_INITIAL_HEAP_SIZE: 4294967296 - name: Run tests (with IFD) - run: nix-build -j auto --show-trace --arg enableBig false --pure --arg enableLegacyIfd true tests -A build.all + run: nix build -j auto --show-trace --reference-lock-file flake.lock "./tests#test-all-no-big" env: GC_INITIAL_HEAP_SIZE: 4294967296