Skip to content

Commit

Permalink
Run the flake-regressions test suite
Browse files Browse the repository at this point in the history
  • Loading branch information
edolstra committed Apr 24, 2024
1 parent 4a9b7c8 commit 7eaa93d
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -167,3 +167,24 @@ jobs:
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- run: nix build -L .#hydraJobs.tests.githubFlakes .#hydraJobs.tests.tarballFlakes

flake_regressions:
needs: vm_tests
runs-on: ubuntu-22.04
steps:
- name: Checkout nix
uses: actions/checkout@v4
- name: Checkout flake-regressions
uses: actions/checkout@v4
with:
repository: edolstra/flake-regressions
path: flake-regressions
ref: path-workaround
- name: Checkout flake-regressions-data
uses: actions/checkout@v4
with:
repository: DeterminateSystems/flake-regressions-data
path: flake-regressions/tests
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- run: nix build --out-link ./new-nix && PATH=$(pwd)/new-nix/bin:$PATH scripts/flake-regressions.sh
27 changes: 27 additions & 0 deletions scripts/flake-regressions.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#! /usr/bin/env bash

set -e

echo "Nix version:"
nix --version

cd flake-regressions

status=0

flakes=$(ls -d tests/*/*/* | head -n25)

echo "Running flake tests..."

for flake in $flakes; do

if ! REGENERATE=0 ./eval-flake.sh $flake; then
status=1
echo "$flake"
else
echo "$flake"
fi

done

exit "$status"

0 comments on commit 7eaa93d

Please sign in to comment.