Files
nixos-config/scripts/test
T
kiskaadee ff5394c7b2 feat(ci): expand flake checks with luacheck, add test runner script, and streamline nix CLI ergonomics
- Add `luacheck` check block to `checks.${system}` in `flake.nix` for Neovim Lua scripts.
- Add visual status indicators and completion logs across all flake check derivations.
- Create local test runner script (`scripts/test`) to execute ShellCheck, Lua linting, Ruff, Pyright, and flake checks locally.
- Add intelligent Bash wrapper in `home/shell/interactive.sh` to auto-inject `-L` into `nix flake check`.
- Add `check` and `nfc` shell aliases in `home/shell.nix`.
- Clean up whitespace in `home/config/nvim/lsp.lua`.

Rationale: Enhances local developer experience and code quality gates by standardizing linting, type-checking, and test execution workflows.
2026-09-14 19:25:16 -05:00

23 lines
831 B
Bash
Executable File

#!/usr/bin/env bash
# scripts/test - Automated test & invariant verification runner for Workstation Config
set -euo pipefail
cd "$(dirname "$0")/.."
echo "🐚 Running ShellCheck across shell scripts..."
find . -type f -name "*.sh" -not -path "./.git/*" -exec shellcheck -s bash {} +
echo "✅ ShellCheck passed!"
echo "🌙 Checking Neovim Lua configuration (luacheck)..."
nix-shell -p luaPackages.luacheck --run "luacheck home/config/nvim --globals vim"
echo "✅ Lua checks passed!"
echo "🐍 Running Python linters & type analysis (Ruff & Pyright)..."
nix-shell -p ruff pyright --run "ruff check --no-cache . && ruff format --check . && pyright ."
echo "✅ Python checks passed!"
echo "❄️ Verifying NixOS flake & sandbox checks..."
nix flake check -L
echo "✨ All checks and static analyses passed successfully!"