-
Notifications
You must be signed in to change notification settings - Fork 15
74 lines (60 loc) · 2.02 KB
/
Copy pathci.yml
File metadata and controls
74 lines (60 loc) · 2.02 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
name: CI
on:
pull_request:
branches: [main]
push:
branches: [main]
permissions:
contents: read
jobs:
ci:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: "20"
cache: npm
cache-dependency-path: extensions/package-lock.json
- name: Install extension dependencies
run: npm ci --prefix extensions
- name: Extension tooling smoke check
run: npm --prefix extensions exec vitest --version
- name: CLI smoke checks
run: |
node bin/taskplane.mjs help
node bin/taskplane.mjs version
node bin/taskplane.mjs init --preset full --dry-run --force
node bin/taskplane.mjs uninstall --dry-run --yes
- name: Verify docs relative links
run: |
python - <<'PY'
import re
from pathlib import Path
root = Path('.')
files = [
p for p in root.rglob('*.md')
if '.git' not in p.parts
and 'node_modules' not in p.parts
and not ('.pi' in p.parts and 'local' in p.parts)
]
pattern = re.compile(r'\[[^\]]+\]\(([^)]+)\)')
missing = []
for file in files:
text = file.read_text(encoding='utf-8', errors='ignore')
for link in pattern.findall(text):
if link.startswith(('http://', 'https://', 'mailto:', '#')):
continue
target = (file.parent / link.split('#', 1)[0].split('?', 1)[0]).resolve()
if not target.exists():
missing.append((file.as_posix(), link))
if missing:
print(f"Missing links: {len(missing)}")
for file, link in missing:
print(f"{file} -> {link}")
raise SystemExit(1)
print('No missing relative links.')
PY