From 29d717aab5189b3383d965928823ddac8a95e8f3 Mon Sep 17 00:00:00 2001 From: Austin Horstman Date: Tue, 1 Jul 2025 18:21:40 -0500 Subject: [PATCH] ci: tests fetch nixpkgs from flake.lock rev Signed-off-by: Austin Horstman --- .github/workflows/test.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index bec86e395..41e4e7883 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -49,11 +49,14 @@ jobs: runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 + - name: Get Nixpkgs revision from flake.lock + id: get-nixpkgs + run: | + echo "rev=$(jq -r '.nodes.nixpkgs.locked.rev' flake.lock)" >> "$GITHUB_OUTPUT" - uses: cachix/install-nix-action@v31 if: github.event_name == 'schedule' || needs.changes.outputs.docs == 'true' || needs.changes.outputs.tests == 'true' || needs.changes.outputs.hm == 'true' || needs.changes.outputs.format == 'true' with: - # TODO: Adjust uninstall to not need channel - nix_path: nixpkgs=channel:nixos-unstable + nix_path: nixpkgs=https://github.com/NixOS/nixpkgs/archive/${{ steps.get-nixpkgs.outputs.rev }}.tar.gz extra_nix_config: | experimental-features = nix-command flakes - name: Build docs