feat(yield): register workflows with coding agents (#285) #45
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: CI speed policy | |
| # Structural enforcement of the Go CI speed policy: every job that compiles Go | |
| # must go through the shared .github/actions/go-setup action (module + build | |
| # caching, Windows Defender exclusions). See .github/scripts/lint_go_ci_policy.py. | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - ".github/workflows/**" | |
| - ".github/actions/go-setup/**" | |
| - ".github/scripts/lint_go_ci_policy.py" | |
| - ".github/scripts/ci_shard.py" | |
| - ".github/scripts/test_ci_shard.py" | |
| pull_request: | |
| paths: | |
| - ".github/workflows/**" | |
| - ".github/actions/go-setup/**" | |
| - ".github/scripts/lint_go_ci_policy.py" | |
| - ".github/scripts/ci_shard.py" | |
| - ".github/scripts/test_ci_shard.py" | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ci-policy-${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| go-caching-policy: | |
| name: Go caching policy | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.12" | |
| - name: Install PyYAML | |
| run: pip install pyyaml | |
| - name: Enforce Go CI speed policy | |
| run: python .github/scripts/lint_go_ci_policy.py | |
| # The shard-selection controller is itself gated: a broken partition would | |
| # silently drop tests from every Windows shard. | |
| - name: Test shard-selection controller | |
| run: python -m unittest test_ci_shard | |
| working-directory: .github/scripts |