Repository navigation
54 lines (51 loc) · 1.67 KB
/
Copy pathdocs-validation.yml
File metadata and controls
54 lines (51 loc) · 1.67 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
name: Documentation validation
on:
pull_request:
push:
branches: [main]
permissions:
contents: read
jobs:
docs:
name: Validate documentation links
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Test the link checker
run: python -m unittest discover -s tests -v
- name: Check relative Markdown links
run: python scripts/check_docs.py
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 24
cache: npm
cache-dependency-path: dashboard/package-lock.json
- name: Install dashboard dependencies
run: npm ci --prefix dashboard
- name: Typecheck dashboard
run: npm --prefix dashboard run typecheck
- name: Lint dashboard
run: npm --prefix dashboard run lint
- name: Test dashboard
run: npm --prefix dashboard test
- name: Build dashboard
run: npm --prefix dashboard run build
# ORIGINAL (preserved, not deleted — disabled by comment):
# - name: Validate Markdown documents
# run: |
# python3 - <<'PY'
# from pathlib import Path
# import sys
#
# files = sorted(Path('.').rglob('*.md'))
# if not files:
# sys.exit('No Markdown documents found.')
# empty = [str(path) for path in files if not path.read_text(encoding='utf-8').strip()]
# if empty:
# sys.exit('Empty Markdown documents:\n' + '\n'.join(empty))
# print(f'Validated {len(files)} non-empty Markdown documents.')
# PY