Skip to content

Commit

Permalink
Run the flake-regressions test suite on demand
Browse files Browse the repository at this point in the history
  • Loading branch information
edolstra committed Apr 24, 2024
1 parent e3a4e40 commit b1ea190
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/flake-regressions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: "Flake regression test suite"

on:
workflow_dispatch:
push:

permissions: read-all

jobs:

flake_regressions:
runs-on: ubuntu-22.04
steps:
- name: Checkout nix
uses: actions/checkout@v4
- name: Checkout flake-regressions
uses: actions/checkout@v4
with:
repository: DeterminateSystems/flake-regressions
path: flake-regressions
- name: Checkout flake-regressions-data
uses: actions/checkout@v4
with:
repository: DeterminateSystems/flake-regressions-data
path: flake-regressions/tests
ref: fix-escaping
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- run: scripts/flake-regressions.sh
21 changes: 21 additions & 0 deletions scripts/flake-regressions.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#! /usr/bin/env bash

set -e
set -x

#nix build --out-link ./new-nix

export PATH=$(pwd)/new-nix:$PATH

cd flake-regressions

status=0

flake=$(ls -d tests/*/*/* | head -n1)

if ! REGENERATE=0 ./eval-flake.sh $flake; then
cat $flake/eval.stderr
status=1
fi

exit "$status"

0 comments on commit b1ea190

Please sign in to comment.