From a4bc7e0b10f6cd3b93547f1dd20707e20aac4f7b Mon Sep 17 00:00:00 2001 From: Benedikt Peetz Date: Tue, 7 Jul 2026 12:38:42 +0200 Subject: scripts/check.sh: Compute the list of checks instead of hard-coding it --- scripts/check.sh | 38 +++++++++----------------------------- 1 file changed, 9 insertions(+), 29 deletions(-) (limited to 'scripts/check.sh') diff --git a/scripts/check.sh b/scripts/check.sh index 9f40c99..aa21f1e 100755 --- a/scripts/check.sh +++ b/scripts/check.sh @@ -1,38 +1,18 @@ #! /usr/bin/env sh +git_root="$(git rev-parse --show-toplevel)" + fmt_check() { echo ".#checks.x86_64-linux.$1" } -check() { - tests="$(fmt_check "$1")" - shift 1 - - for test in "$@"; do - tests="$tests $(fmt_check "$test")" - done - - set -x - # We want to expand `$tests`. - # shellcheck disable=SC2086 +nix eval \ + --file "$git_root/scripts/check_get_tests.nix" \ + --raw | while read -r test; do + echo "Building test '$test'..." + test="$(fmt_check "$test")" nix build \ --option max-jobs 1 \ --print-out-paths --no-link \ - $tests -} - -check atuin-sync \ - back \ - deploy-activate \ - deploy-schema \ - dns \ - formatting \ - git-server \ - rocie \ - rust-motd \ - sharkey \ - sharkey-cpu \ - taskchampion-sync -# email-dns \ -# email-http \ -# email-ip \ + "$test" +done -- cgit v1.3.1