fix(scanner): exclude MDX/HTML comments from placeholder word count #107
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
| # SPDX-FileCopyrightText: 2026 PythonWoods <dev@pythonwoods.dev> | |
| # SPDX-License-Identifier: Apache-2.0 | |
| name: CI | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - 'release/**' | |
| paths: | |
| - 'src/**' | |
| - 'tests/**' | |
| - 'pyproject.toml' | |
| - 'uv.lock' | |
| - 'noxfile.py' | |
| - '.github/workflows/ci.yml' | |
| pull_request: | |
| branches: | |
| - main | |
| - 'release/**' | |
| paths: | |
| - 'src/**' | |
| - 'tests/**' | |
| - 'pyproject.toml' | |
| - 'uv.lock' | |
| - 'noxfile.py' | |
| - '.github/workflows/ci.yml' | |
| permissions: | |
| contents: read | |
| jobs: | |
| # ββ Static analysis (pinned to Python 3.11, Linux only β runs once) ββββββββββ | |
| lint: | |
| name: Lint & Type Check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v8.1.0 | |
| with: | |
| enable-cache: true | |
| - name: Set up Python 3.11 | |
| run: uv python install 3.11 | |
| - name: Run lint, format, typecheck | |
| run: uvx nox -s lint format typecheck | |
| # ββ Test suite ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ | |
| # Lean mode (PR): ubuntu-latest Γ 3.13 only β fast feedback, covers 90% of bugs. | |
| # Exhaustive mode (push to main / release/**): full 3 OS Γ 3 Python matrix. | |
| tests: | |
| name: Tests / ${{ matrix.os }} / py${{ matrix.python-version }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: ${{ fromJSON(github.event_name == 'pull_request' && '["ubuntu-latest"]' || '["ubuntu-latest","windows-latest","macos-latest"]') }} | |
| python-version: ${{ fromJSON(github.event_name == 'pull_request' && '["3.13"]' || '["3.11","3.12","3.13"]') }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v8.1.0 | |
| with: | |
| enable-cache: true | |
| - name: Set up Python ${{ matrix.python-version }} | |
| run: uv python install ${{ matrix.python-version }} | |
| - name: Cache .nox | |
| uses: actions/cache@v5 | |
| with: | |
| path: .nox/ | |
| key: ${{ matrix.os }}-nox-${{ matrix.python-version }}-${{ hashFiles('uv.lock') }} | |
| restore-keys: | | |
| ${{ matrix.os }}-nox-${{ matrix.python-version }}- | |
| - name: Run tests | |
| run: uvx nox -s tests --python ${{ matrix.python-version }} | |
| - name: Set up Node.js | |
| if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.13' | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '24' | |
| - name: Upload coverage | |
| if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.13' | |
| uses: codecov/codecov-action@v6 | |
| with: | |
| files: ./coverage.xml | |
| fail_ci_if_error: false | |
| # ββ Security audit ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ | |
| security: | |
| name: Security | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v8.1.0 | |
| with: | |
| enable-cache: true | |
| - name: Run pip-audit | |
| run: uvx nox -s security | |
| # ββ REUSE compliance ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ | |
| reuse: | |
| name: REUSE Compliance | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: REUSE Compliance Check | |
| uses: fsfe/reuse-action@v6 |