PR Quality Checks #837
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
| # This workflow runs on pull requests targeting main to perform quality checks. | |
| name: PR Quality Checks | |
| on: | |
| pull_request: | |
| branches: [main] | |
| workflow_dispatch: | |
| jobs: | |
| pre-commit: | |
| runs-on: ubuntu-latest | |
| name: Pre-commit checks | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| lfs: true | |
| - name: Verify Git LFS pointers | |
| run: git lfs fsck --pointers | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.10' | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6.8.0 | |
| - name: Setup just | |
| uses: extractions/setup-just@e33e0265a09d6d736e2ee1e0eb685ef1de4669ff | |
| - name: Run pre-commit | |
| run: | | |
| just ci-lint | |
| docs-build-test: | |
| runs-on: ubuntu-latest | |
| name: Test documentation build | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| lfs: true | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.10' | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6.8.0 | |
| - name: Setup just | |
| uses: extractions/setup-just@e33e0265a09d6d736e2ee1e0eb685ef1de4669ff | |
| - name: Build documentation | |
| run: | | |
| just ci-deploy-internal ci-deploy-external | |
| - name: Upload docs build artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: docs-build | |
| path: | | |
| public/ | |
| external/ | |
| validate-claude-md: | |
| runs-on: ubuntu-latest | |
| name: Validate CLAUDE.md files | |
| steps: | |
| - name: Checkout PR branch | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6.8.0 | |
| - name: Find changed CLAUDE.md files | |
| id: changed | |
| env: | |
| BASE_REF: ${{ github.base_ref }} | |
| run: | | |
| if [ -z "$BASE_REF" ]; then | |
| echo "No base ref (workflow_dispatch) — skipping CLAUDE.md detection." | |
| echo "files=" >> $GITHUB_OUTPUT | |
| exit 0 | |
| fi | |
| FILES=$(git diff --name-only origin/$BASE_REF...HEAD -- '**/CLAUDE.md' | tr '\n' ' ') | |
| echo "files=$FILES" >> $GITHUB_OUTPUT | |
| if [ -z "$FILES" ]; then | |
| echo "No CLAUDE.md files changed — skipping validation." | |
| else | |
| echo "Changed CLAUDE.md files: $FILES" | |
| fi | |
| - name: Set up Python | |
| if: steps.changed.outputs.files != '' | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.10' | |
| - name: Install dependencies | |
| if: steps.changed.outputs.files != '' | |
| run: uv pip install --system huggingface_hub requests | |
| - name: Validate CLAUDE.md files | |
| if: steps.changed.outputs.files != '' | |
| env: | |
| CHANGED_FILES: ${{ steps.changed.outputs.files }} | |
| run: | | |
| python .github/scripts/validate_claude_md.py $CHANGED_FILES |