- flake.nix: add ruff and pyright to packages.default nativeCheckInputs and preCheck so nix build / nix flake check enforce lint, types, and pytest in the Nix sandbox - .githooks/pre-commit: keep local pre-commit hook fast (<0.5s) running ruff, pyright, and pytest - .gitea/workflows/ci.yaml: run nix flake check on push and pull_request to main - AGENTS.md: document .githooks/pre-commit, @pytest.mark.xfail(strict=True) Red-phase rule, and .gitea/workflows/ci.yaml expectations
11 lines
265 B
Bash
Executable File
11 lines
265 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
if command -v ruff >/dev/null 2>&1 && command -v pyright >/dev/null 2>&1 && command -v pytest >/dev/null 2>&1; then
|
|
ruff check .
|
|
pyright
|
|
pytest
|
|
else
|
|
nix develop --command bash -c "ruff check . && pyright && pytest"
|
|
fi
|