Skip to content

fix(hooks): install pre-commit from versioned template to core.hooksPath #396

fix(hooks): install pre-commit from versioned template to core.hooksPath

fix(hooks): install pre-commit from versioned template to core.hooksPath #396

Workflow file for this run

name: CI
on:
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
jobs:
validate:
name: Validate Scripts
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y shellcheck jq curl
- name: Validate shell syntax
run: |
# Validate ralph
bash -n scripts/ralph
# Validate ralph-doctor
bash -n scripts/ralph-doctor.sh
# Validate install script
bash -n install.sh
- name: Run shellcheck
run: |
# Check all bash scripts (with some exceptions for sourced files)
shellcheck --severity=warning \
scripts/ralph-doctor.sh \
scripts/ralph \
install.sh || true
- name: Check executable permissions
run: |
# Ensure hooks are executable
chmod +x .claude/hooks/*.sh
chmod +x scripts/ralph
chmod +x scripts/ralph-doctor.sh
- name: Validate hooks structure
run: |
# Check hooks exist
test -d .claude/hooks
# Verify all hooks have .sh extension
for hook in .claude/hooks/*; do
if [ -f "$hook" ] && [[ ! "$hook" == *.sh ]]; then
echo "ERROR: Hook $hook missing .sh extension"
exit 1
fi
done
- name: Validate skills structure
run: |
# Check all skills have SKILL.md
for skill_dir in .claude/skills/*/; do
if [ -d "$skill_dir" ]; then
if [ ! -f "${skill_dir}SKILL.md" ]; then
echo "ERROR: Skill $(basename "$skill_dir") missing SKILL.md"
exit 1
fi
fi
done
echo "✅ All skills have SKILL.md"
test:
name: Run Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install test dependencies
run: |
pip install pytest pytest-cov
- name: Run pytest
run: |
if [ -d "tests" ]; then
python -m pytest tests/ -v --tb=short || true
fi
- name: Run harness tests
run: |
if [ -d "tests/harness" ]; then
python -m pytest tests/harness/ -v --tb=short
fi
health-check:
name: Ralph Doctor
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run ralph-doctor (quick mode)
run: |
bash scripts/ralph-doctor.sh --quick || true