forked from ericbuess/claude-code-docs
-
Notifications
You must be signed in to change notification settings - Fork 6
55 lines (45 loc) · 1.51 KB
/
validate.yml
File metadata and controls
55 lines (45 loc) · 1.51 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
name: Validate Documentation
on:
schedule:
- cron: '0 6 * * *' # Daily at 6am UTC
workflow_dispatch:
jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: Install dependencies
run: |
python3 -m pip install requests>=2.32.0
python3 -m pip install pytest pytest-cov pytest-asyncio pytest-mock pyyaml
- name: Validate all paths reachable
run: python3 scripts/lookup_paths.py --validate-all
- name: Run validation tests
run: |
if [ -d "tests/validation" ] && [ "$(ls -A tests/validation)" ]; then
pytest tests/validation/ -v --tb=short
else
echo "Validation tests not yet implemented"
fi
- name: Generate validation report
run: |
set -euo pipefail
mkdir -p reports
# Use UTC dates and safe filename format
REPORT_DATE=$(date -u +'%Y-%m-%d')
REPORT_FILE="reports/validation-$(date -u +'%Y%m%d').md"
# Use printf for safer output generation
{
printf "# Validation Report - %s\n" "${REPORT_DATE}"
printf "\n"
printf "Validation completed at %s\n" "$(date -u)"
} > "${REPORT_FILE}"
- name: Upload report
uses: actions/upload-artifact@v4
with:
name: validation-report
path: reports/validation-*.md