Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .githooks/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,23 @@ if command -v cargo-deny >/dev/null 2>&1 || command -v cargo deny >/dev/null 2>&
}
fi

# 5. Validate workflow YAML syntax
if command -v python3 >/dev/null 2>&1; then
for f in .github/workflows/*.yml; do
if [ -f "$f" ]; then
python3 -c "import yaml; yaml.safe_load(open('$f'))" 2>/dev/null || {
echo "FAIL: $f has invalid YAML syntax"
exit 1
}
fi
done
fi

# 6. Check for stale .perf files in src
stale=$(find . -name "*.perf" -not -path "./target/*" 2>/dev/null)
if [ -n "$stale" ]; then
echo "FAIL: stale .perf files committed: $stale"
exit 1
fi

echo "[guard] All checks passed."
13 changes: 8 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,14 @@ jobs:
- name: Install tools
run: |
cargo install cargo-audit cargo-deny 2>/dev/null
- name: Validate workflow YAML syntax
run: |
for f in .github/workflows/*.yml; do
python3 -c "import yaml; yaml.safe_load(open('$f'))" || { echo "FAIL: $f has invalid YAML"; exit 1; }
echo " OK: $f"
done
- name: Build check
run: cargo check --release
- name: cargo test
run: cargo test --release
- name: clippy (deny warnings) — lib only
Expand All @@ -36,11 +44,6 @@ jobs:
- name: Init smoke test
run: |
timeout 10 ./target/release/reliary-agent init </dev/null 2>&1 || true
- name: Stale file detector
run: |
stale=$(find . -name "*.bak" -o -name "*.perf" -o -name "*.old" -not -path "./target/*" 2>/dev/null)
if [ -n "$stale" ]; then echo "FAIL: stale files: $stale"; exit 1; fi
test -f .gitleaks.toml || { echo "FAIL: .gitleaks.toml missing"; exit 1; }
- name: Dependency graph diff (against master)
run: |
cargo tree -e normal --prefix none 2>/dev/null | sort > /tmp/deps_head.txt
Expand Down
Loading