Skip to content

Commit

Permalink
add regression test for all templates
Browse files Browse the repository at this point in the history
  • Loading branch information
Mic92 committed Apr 11, 2024
1 parent a210132 commit 715d087
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,16 @@ jobs:
run: nix develop --command reuse lint
- name: Check nix flake show runs successfully
run: nix flake show
- name: Check templates
run:
set -eux
nix eval --json --apply builtins.attrNames .#templates | jq -r '.[]' | while IFS=$'\t' read -r name; do \
nix flake new -t ".#$name" "${TEMPDIR:-/tmp}/${name}"; \
if [[ "$name" == "ghaf-module" ]]; then
nix-instantiate --parse "/tmp/${name}/default.nix"
else
nix flake show "${TEMPDIR:-/tmp}/${name}"
fi
rm -r "${TEMPDIR:-/tmp}/${name}"
done

0 comments on commit 715d087

Please sign in to comment.