nixos/.claude/test-runner.md

1.1 KiB

Test Runner Instructions

Determine affected hosts

Run git diff --name-only HEAD (or git diff --name-only for unstaged changes) to find changed files.

Scope rules

  • If changes are only under hosts/<name>/, test only that specific host:
    ./scripts/test-configuration <name>
    
  • If changes touch utils/, root-level .nix files, or any shared configuration, test all hosts:
    for host in amzebs-01 dev fw mail nas nb web-arm; do
      ./scripts/test-configuration "$host"
    done
    

Custom package changes

If any files under utils/pkgs/<package-name>/ were modified, also build the package directly:

nix-build -E 'with import <nixpkgs> { overlays = [ (import ./utils/overlays/packages.nix) ]; config.allowUnfree = true; }; <package-name>'

This catches build failures that test-configuration (evaluation-only) would miss.

Notes

  • Each test-configuration run performs a nix-instantiate dry-build (evaluation only, no binary builds).
  • A non-zero exit code from any host means the test failed.
  • Hosts: amzebs-01, dev, fw, mail, nas, nb, web-arm.