Authenticate scheduled GitHub CLI reads through the broker #775
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.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| verify: | |
| permissions: | |
| contents: read | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1 | |
| with: | |
| persist-credentials: false | |
| - name: Setup Node | |
| uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 | |
| with: | |
| node-version: 20 | |
| cache: npm | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Audit production dependencies | |
| run: npm run audit:production | |
| - name: Test | |
| run: npm test | |
| - name: Typecheck | |
| run: npm run typecheck | |
| # Rebuilds dist/ and fails when the committed output is stale. dist/ is | |
| # committed so a tagged GitHub install needs no build step, so a stale | |
| # commit would ship the wrong CLI to adopters. | |
| - name: Check generated dist | |
| run: npm run check:dist | |
| native-publication-broker: | |
| permissions: | |
| contents: read | |
| runs-on: macos-15 | |
| timeout-minutes: 30 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1 | |
| with: | |
| persist-credentials: false | |
| - name: Setup Node | |
| uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 | |
| with: | |
| node-version: 20 | |
| cache: npm | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Run native peer-authentication and publication tests | |
| env: | |
| KAIZEN_REQUIRE_NATIVE_BROKER_TESTS: '1' | |
| run: npx vitest run test/macos-publication-broker.test.ts --reporter=verbose | |
| - name: Compile the packaged broker artifacts | |
| run: | | |
| set -euo pipefail | |
| package=$(npm pack --silent) | |
| package_root=$(mktemp -d "$RUNNER_TEMP/kaizen-package.XXXXXX") | |
| tar -xzf "$package" -C "$package_root" | |
| sh -n "$package_root/package/scripts/install-macos-publication-broker.sh" | |
| swiftc -module-cache-path "$RUNNER_TEMP/kaizen-broker-module-cache" "$package_root/package/scripts/macos/kaizen-publication-broker.swift" -o "$RUNNER_TEMP/kaizen-publication-broker" | |
| swiftc -module-cache-path "$RUNNER_TEMP/kaizen-scheduled-module-cache" "$package_root/package/scripts/macos/kaizen-scheduled-launcher.swift" -o "$RUNNER_TEMP/kaizen-scheduled-launcher" | |
| swiftc -module-cache-path "$RUNNER_TEMP/kaizen-supervisor-module-cache" "$package_root/package/scripts/macos/kaizen-supervisor-launcher.swift" -o "$RUNNER_TEMP/kaizen-supervisor-launcher" |