refactor: inline playbook session runtime, unify base-resource identity #78
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 | |
| on: | |
| pull_request: | |
| push: | |
| branches: [main] | |
| concurrency: | |
| group: ci-${{ github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| jobs: | |
| prepare-verification: | |
| name: Prepare verification matrix | |
| runs-on: ubuntu-latest | |
| outputs: | |
| steps: ${{ steps.profile.outputs.steps }} | |
| steps: | |
| - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6 | |
| with: | |
| fetch-depth: 0 | |
| - uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2 | |
| with: | |
| bun-version: "1.3.5" | |
| - id: profile | |
| name: Read full profile from the verification module | |
| run: echo "steps=$(bun scripts/verify.ts full --list-steps)" >> "$GITHUB_OUTPUT" | |
| verify: | |
| name: Verify / ${{ matrix.step }} | |
| needs: prepare-verification | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| step: ${{ fromJSON(needs.prepare-verification.outputs.steps) }} | |
| steps: | |
| - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6 | |
| with: | |
| fetch-depth: 0 | |
| - uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2 | |
| with: | |
| bun-version: "1.3.5" | |
| - run: bun install --frozen-lockfile | |
| - name: Run verification step | |
| env: | |
| BASE: ${{ github.event_name == 'pull_request' && github.event.pull_request.base.sha || github.event.before }} | |
| run: bun scripts/verify.ts full --step "${{ matrix.step }}" | |
| maintainer-evidence: | |
| name: Maintainer evidence | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6 | |
| with: | |
| fetch-depth: 0 | |
| - uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2 | |
| with: | |
| bun-version: "1.3.5" | |
| - name: Require evidence only for high-risk changes | |
| env: | |
| BASE_SHA: ${{ github.event_name == 'pull_request' && github.event.pull_request.base.sha || github.event.before }} | |
| HEAD_SHA: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }} | |
| PR_BODY: ${{ github.event.pull_request.body }} | |
| run: bun scripts/pr-evidence.ts | |
| package-compatibility: | |
| name: Package compatibility / Node ${{ matrix.node }} | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| node: [22, 24] | |
| steps: | |
| - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6 | |
| - uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2 | |
| with: | |
| bun-version: "1.3.5" | |
| - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6 | |
| with: | |
| node-version: ${{ matrix.node }} | |
| package-manager-cache: false | |
| - run: bun install --frozen-lockfile | |
| - run: bun scripts/verify.ts release --step build-packages | |
| - run: bun scripts/verify.ts release --step package-smoke | |
| gate: | |
| name: Gate | |
| runs-on: ubuntu-latest | |
| needs: [prepare-verification, verify, maintainer-evidence, package-compatibility] | |
| if: always() | |
| steps: | |
| - name: Check results | |
| run: | | |
| if [ "${{ needs.prepare-verification.result }}" != "success" ] || \ | |
| [ "${{ needs.verify.result }}" != "success" ] || \ | |
| [ "${{ needs.maintainer-evidence.result }}" != "success" ] || \ | |
| [ "${{ needs.package-compatibility.result }}" != "success" ]; then | |
| echo "One or more required checks failed." | |
| exit 1 | |
| fi | |
| echo "All checks passed." |