Add new checkers to validate documentation and fix all findings #13
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Matter Documentation Validation | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| - 'v*-branch' | |
| paths: | |
| - 'docs/**' | |
| - 'samples/**/*.rst' | |
| - 'scripts/matter_sample_checker/**' | |
| - '.github/workflows/doc-validation.yml' | |
| - 'west.yml' | |
| permissions: | |
| contents: read | |
| env: | |
| WEST_PATH_CACHE: ${{ github.workspace }}/west-path-cache | |
| jobs: | |
| matter-doc-validation: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Checkout the code | |
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| with: | |
| path: ncs-matter | |
| - name: Set up Python | |
| uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5 | |
| with: | |
| python-version: 3.12 | |
| cache: pip | |
| cache-dependency-path: | | |
| ncs-matter/scripts/requirements.txt | |
| ncs-matter/docs/requirements-doc.txt | |
| - name: Install packages | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y wget python3-pip git | |
| pip install -r ncs-matter/scripts/requirements.txt | |
| pip install -r ncs-matter/docs/requirements-doc.txt | |
| - name: Restore west module path cache | |
| uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4 | |
| with: | |
| path: west-path-cache | |
| key: west-path-cache-${{ hashFiles('ncs-matter/west.yml') }} | |
| restore-keys: | | |
| west-path-cache- | |
| - name: Prepare west workspace | |
| run: | | |
| rm -rf .west | |
| west init -l ncs-matter --mf west.yml | |
| west update -n -o=--depth=1 --path-cache "${WEST_PATH_CACHE}" | |
| - name: Validate Matter documentation | |
| run: | | |
| python ncs-matter/scripts/matter_sample_checker/matter_doc_checker.py \ | |
| --base ncs-matter |