-
Notifications
You must be signed in to change notification settings - Fork 0
79 lines (73 loc) · 2.33 KB
/
ci.yml
File metadata and controls
79 lines (73 loc) · 2.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check shell scripts parse correctly
run: |
echo "Checking shell scripts..."
for f in setup.sh install.sh verify.sh uninstall.sh update.sh bin/ccs; do
echo " $f"
bash -n "$f"
done
echo "All scripts parse OK"
- name: Check markdown internal links
run: |
echo "Checking README.md internal links..."
# Extract anchor links from TOC and verify headings exist
grep -oP '\(#[a-z0-9-]+\)' README.md | tr -d '()' | while read -r anchor; do
heading="${anchor#\#}"
# GitHub converts headings: lowercase, spaces to -, strip special chars
if ! grep -iqP "^#{1,6}\s+.*$(echo "$heading" | sed 's/-/[- ]/g')" README.md; then
echo " WARNING: anchor $anchor may be broken"
fi
done
echo "Link check done"
- name: Verify repo structure
run: |
echo "Checking required files exist..."
files=(
"setup.sh"
"install.sh"
"verify.sh"
"uninstall.sh"
"update.sh"
"bin/ccs"
"commands/rename-session.md"
"commands/standup.md"
"rules/session-naming.md"
"skills/planning-with-files/SKILL.md"
"templates/claude-md-snippet.md"
"completions/_ccs"
"completions/ccs.bash"
"docs/cheatsheet.md"
"docs/cheatsheet.pdf"
"LICENSE"
)
missing=0
for f in "${files[@]}"; do
if [ ! -f "$f" ]; then
echo " MISSING: $f"
missing=$((missing + 1))
fi
done
if [ "$missing" -gt 0 ]; then
echo "$missing files missing!"
exit 1
fi
echo "All required files present"
- name: Check scripts are executable
run: |
for f in setup.sh install.sh verify.sh uninstall.sh update.sh bin/ccs; do
if [ ! -x "$f" ]; then
echo "FAIL: $f is not executable"
exit 1
fi
done
echo "All scripts are executable"