fix: human-readable text output for simple commands (#419) #1321
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 | |
| permissions: {} | |
| concurrency: | |
| group: ${{ github.ref }}-${{ github.workflow }} | |
| cancel-in-progress: true | |
| jobs: | |
| test-node: | |
| name: Test Node.js | |
| permissions: | |
| contents: read | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| node-version: [22.x, 24.x, 25.x] | |
| runs-on: ${{ matrix.os }} | |
| # Per-endpoint Zod schemas (#171) compile to ~72 MB of .d.ts; tsc needs | |
| # more than the 2 GB Node default to hold the type graph during emit. | |
| env: | |
| NODE_OPTIONS: --max-old-space-size=6144 | |
| steps: | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7 | |
| with: | |
| persist-credentials: false | |
| - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| - name: Install | |
| run: npm ci | |
| - name: Run unit tests | |
| run: npm test | |
| shell: bash | |
| license-header: | |
| name: Check SPDX license header | |
| permissions: | |
| contents: read | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7 | |
| with: | |
| persist-credentials: false | |
| - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6 | |
| - name: Install | |
| run: npm ci | |
| - name: License header check | |
| run: npm run test:spdx | |
| notice-file: | |
| name: Check NOTICE.txt is up to date | |
| permissions: | |
| contents: read | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7 | |
| with: | |
| persist-credentials: false | |
| - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6 | |
| - name: Install | |
| run: npm ci | |
| - name: Verify NOTICE.txt | |
| run: npm run test:notice | |
| test-bun: | |
| name: Test Bun | |
| permissions: | |
| contents: read | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| runs-on: ${{ matrix.os }} | |
| # `bun run build` shells out to Node-hosted tsc; same heap constraint as | |
| # the Node job above. | |
| env: | |
| NODE_OPTIONS: --max-old-space-size=6144 | |
| steps: | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7 | |
| with: | |
| persist-credentials: false | |
| - uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2 | |
| - name: Install | |
| run: bun install | |
| - name: Build | |
| run: bun run build | |
| - name: Run unit tests | |
| # 30 s per test: Windows runners are slower, and building 500+ Commander | |
| # stubs for the full ES manifest takes longer than bun's 5 s default. | |
| run: bun test --timeout 30000 | |
| validate-pr-title: | |
| if: github.event_name == 'pull_request' | |
| name: Validate PR title | |
| permissions: | |
| pull-requests: read | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: PR Conventional Commit Validation | |
| uses: ytanikin/pr-conventional-commits@639145d78959c53c43112365837e3abd21ed67c1 # v1.5.2 | |
| with: | |
| task_types: '["feat","fix","docs","test","ci","refactor","perf","chore","revert"]' | |
| add_label: "false" | |
| megalinter: | |
| name: MegaLinter | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7 | |
| with: | |
| fetch-depth: 0 | |
| - name: MegaLinter | |
| uses: oxsecurity/megalinter/flavors/javascript@ef3e84b8b836d76db562d0f3ed7da61e8fd538bc # v9.6.0 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| VALIDATE_ALL_CODEBASE: ${{ github.event_name == 'push' }} | |
| cli-schema: | |
| name: Check CLI schema is up to date | |
| permissions: | |
| contents: read | |
| runs-on: ubuntu-latest | |
| env: | |
| NODE_OPTIONS: --max-old-space-size=6144 | |
| steps: | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7 | |
| with: | |
| persist-credentials: false | |
| - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6 | |
| with: | |
| node-version: 24.x | |
| - name: Install | |
| run: npm ci | |
| - name: Build | |
| run: npm run build | |
| - name: Regenerate CLI schema | |
| run: npm run build:schema | |
| - name: Check for uncommitted changes | |
| run: | | |
| if ! git diff --exit-code docs/cli/schema.json; then | |
| echo "" | |
| echo "docs/cli/schema.json is out of date. Run 'npm run build:schema' and commit the result." | |
| exit 1 | |
| fi | |
| ci: | |
| name: CI Result | |
| if: always() | |
| runs-on: ubuntu-latest | |
| needs: | |
| - test-node | |
| - license-header | |
| - test-bun | |
| - validate-pr-title | |
| - megalinter | |
| - cli-schema | |
| steps: | |
| - run: | | |
| if [[ "${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }}" == "true" ]]; then | |
| echo "One or more required jobs failed or were cancelled." | |
| exit 1 | |
| fi |