0.2.1 #13
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
| # PR Validation: lint + CI (build + test, no package) | |
| name: PR | |
| on: | |
| pull_request: | |
| branches: [main] | |
| permissions: | |
| contents: read | |
| actions: write | |
| pull-requests: read | |
| concurrency: | |
| group: pr-${{ github.event.pull_request.number }} | |
| cancel-in-progress: true | |
| jobs: | |
| lint: | |
| uses: ./.github/workflows/_lint.yml | |
| ci: | |
| needs: [lint] | |
| if: ${{ !cancelled() && needs.lint.result == 'success' }} | |
| uses: ./.github/workflows/_ci.yml | |
| with: | |
| skip_perf: true | |
| skip_package: true | |
| # ── Single required status check ── | |
| ci-ok: | |
| needs: [lint, ci] | |
| if: ${{ always() }} | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 5 | |
| steps: | |
| - name: All PR stages must succeed or skip | |
| env: | |
| RESULTS: ${{ toJSON(needs) }} | |
| run: | | |
| echo "$RESULTS" | python3 -c " | |
| import json, sys | |
| needs = json.load(sys.stdin) | |
| bad = {k: v['result'] for k, v in needs.items() if v['result'] not in ('success', 'skipped')} | |
| if bad: | |
| print('CI NOT OK:', bad) | |
| sys.exit(1) | |
| print('CI OK:', ', '.join(needs)) | |
| " |