-
Notifications
You must be signed in to change notification settings - Fork 0
79 lines (70 loc) · 2.45 KB
/
docs-review.yml
File metadata and controls
79 lines (70 loc) · 2.45 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
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
# yamllint disable rule:line-length rule:truthy
name: Docs Review
on:
pull_request:
branches: [main, dev]
paths:
- "**/*.md"
- "**/*.mdc"
- "docs/**"
- "requirements-docs-ci.txt"
- "scripts/check-docs-commands.py"
- "scripts/docs_site_validation.py"
- "tests/unit/test_check_docs_commands_script.py"
- "tests/unit/docs/test_docs_review.py"
- "tests/unit/docs/test_code_review_docs_parity.py"
- ".github/workflows/docs-review.yml"
push:
branches: [main, dev]
paths:
- "**/*.md"
- "**/*.mdc"
- "docs/**"
- "requirements-docs-ci.txt"
- "scripts/check-docs-commands.py"
- "scripts/docs_site_validation.py"
- "tests/unit/test_check_docs_commands_script.py"
- "tests/unit/docs/test_docs_review.py"
- "tests/unit/docs/test_code_review_docs_parity.py"
- ".github/workflows/docs-review.yml"
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
docs-review:
name: Docs Review
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: "pip"
- name: Install docs review dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements-docs-ci.txt
- name: Run docs review suite
run: |
mkdir -p logs/docs-review
DOCS_REVIEW_LOG="logs/docs-review/docs-review_$(date -u +%Y%m%d_%H%M%S).log"
python -m pytest tests/unit/docs/test_docs_review.py tests/unit/docs/test_code_review_docs_parity.py -q 2>&1 | tee "$DOCS_REVIEW_LOG"
exit "${PIPESTATUS[0]:-$?}"
- name: Validate docs commands and cross-site links
run: |
mkdir -p logs/docs-review
DOCS_COMMAND_LOG="logs/docs-review/docs-command-validation_$(date -u +%Y%m%d_%H%M%S).log"
python scripts/check-docs-commands.py 2>&1 | tee "$DOCS_COMMAND_LOG"
exit "${PIPESTATUS[0]:-$?}"
- name: Upload docs review logs
if: always()
uses: actions/upload-artifact@v4
with:
name: docs-review-logs
path: logs/docs-review/
if-no-files-found: ignore