[DEV] add PR title validation in CI #4160
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: Build application | |
| on: | |
| push: | |
| pull_request: | |
| merge_group: | |
| schedule: | |
| - cron: '0 0 * * *' | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} | |
| cancel-in-progress: >- | |
| ${{ github.ref != 'refs/heads/master' && | |
| github.event_name != 'merge_group' && | |
| !startsWith(github.ref, 'refs/heads/gh-readonly-queue') }} | |
| jobs: | |
| pr_title: | |
| name: PR Title Gate | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Non-PR event — skip title validation | |
| if: ${{ github.event_name != 'pull_request' }} | |
| run: echo "Not a PR event; skipping title check" | |
| - name: Checkout | |
| if: ${{ github.event_name == 'pull_request' }} | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| if: ${{ github.event_name == 'pull_request' }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| - name: Validate PR title | |
| if: ${{ github.event_name == 'pull_request' }} | |
| run: python .github/scripts/validate_pr.py | |
| pre-commit: | |
| needs: | |
| - pr_title | |
| uses: ./.github/workflows/pre-commit.yml | |
| ubuntu: | |
| needs: | |
| - pre-commit | |
| uses: ./.github/workflows/ubuntu.yml | |
| mac: | |
| needs: | |
| - pre-commit | |
| uses: ./.github/workflows/mac.yml | |
| windows: | |
| needs: | |
| - pre-commit | |
| uses: ./.github/workflows/windows.yml | |
| perf: | |
| needs: | |
| - ubuntu | |
| - mac | |
| - windows | |
| uses: ./.github/workflows/perf.yml | |
| pages: | |
| needs: | |
| - perf | |
| uses: ./.github/workflows/pages.yml |