fix: harden shared CLI output publication (#121) #302
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: | |
| workflow_call: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: "15 3 * * *" | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| permissions: | |
| contents: read | |
| jobs: | |
| audit: | |
| name: Dependency audit (Node LTS) | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v7 | |
| - name: Setup Node | |
| uses: actions/setup-node@v7 | |
| with: | |
| node-version: "lts/*" | |
| cache: npm | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Audit production and development dependencies | |
| run: npm audit | |
| ci: | |
| name: CI (${{ matrix.os }}) | |
| runs-on: ${{ matrix.os }} | |
| timeout-minutes: 20 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, windows-latest, macos-latest] | |
| node: ["lts/*"] | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v7 | |
| - name: Setup Node | |
| uses: actions/setup-node@v7 | |
| with: | |
| node-version: ${{ matrix.node }} | |
| cache: npm | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Install Chromium | |
| if: ${{ hashFiles('vitest.test.browser.config.ts', 'playwright.config.*') != '' }} | |
| run: npx playwright install chromium | |
| - name: Format check | |
| run: npm run fmt --if-present -- --check | |
| - name: Lint | |
| run: npm run lint | |
| - name: Build | |
| run: npm run build | |
| - name: Test | |
| run: npm run test:coverage | |
| - name: Type checks | |
| run: | | |
| npm run typecheck --if-present | |
| npm run test:types --if-present | |
| - name: Package contract | |
| run: | | |
| npm run test:publint | |
| npm run pack:check | |
| packed-templates: | |
| name: Packed template integration (Node LTS) | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v7 | |
| - name: Setup Node | |
| uses: actions/setup-node@v7 | |
| with: | |
| node-version: "lts/*" | |
| cache: npm | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Verify packed CLI against every template | |
| run: npm run test:templates | |
| peer-floor: | |
| name: Packed Askr peer floor (0.2.0) | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v7 | |
| - name: Setup Node | |
| uses: actions/setup-node@v7 | |
| with: | |
| node-version: "lts/*" | |
| cache: npm | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Verify the minimum supported Askr peer | |
| run: npm run test:peer-floor | |
| benchmark: | |
| name: Performance gate (Ubuntu, Node LTS) | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v7 | |
| - name: Setup Node | |
| uses: actions/setup-node@v7 | |
| with: | |
| node-version: "lts/*" | |
| cache: npm | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Run deterministic CLI performance gate | |
| run: npm run bench |