Skip to content

Commit

Permalink
add regression test for all templates
Browse files Browse the repository at this point in the history
Signed-off-by: Jörg Thalheim <joerg@thalheim.io>
  • Loading branch information
Mic92 committed Apr 12, 2024
1 parent 48a535f commit 0658031
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,18 @@ jobs:
run: nix develop --command reuse lint
- name: Check nix flake show runs successfully
run: nix flake show
- name: Check templates
run: |
set -eux -o pipefail
tmp_flakes=$(mktemp -d)
cleanup() { rm -rf "$tmp_flakes"; }
trap cleanup EXIT
nix eval --json --apply builtins.attrNames .#templates | jq -r '.[]' | while IFS=$'\t' read -r name; do
nix flake new -t ".#$name" "${tmp_flakes}/${name}";
if [[ "$name" == "ghaf-module" ]]; then
nix-instantiate --parse "${tmp_flakes}/${name}/default.nix"
else
nix flake show "${tmp_flakes}/${name}"
fi
done

0 comments on commit 0658031

Please sign in to comment.