ci: share one platform run across matrix jobs via --run-key #147
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: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| jobs: | |
| ci: | |
| name: CI | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '24' | |
| cache: 'pnpm' | |
| - name: Install dependencies | |
| run: pnpm install --ignore-scripts | |
| - name: Build packages | |
| # The root typecheck consumes the built dist output, so build | |
| # @benchsdk/client, @benchsdk/runner, and create-bench before running | |
| # typecheck. | |
| run: | | |
| pnpm --filter @benchsdk/client run build | |
| pnpm --filter @benchsdk/runner run build | |
| pnpm --filter create-bench run build | |
| - name: Typecheck | |
| run: pnpm typecheck | |
| - name: Test | |
| run: pnpm --filter @benchsdk/client run test | |
| - name: Test @benchsdk/runner | |
| run: pnpm --filter @benchsdk/runner run test | |
| - name: Test create-bench | |
| run: pnpm --filter create-bench run test | |
| actionlint: | |
| name: Lint workflows | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| # Validates all .github/workflows/*.yml for syntax and expression | |
| # errors. The self-hosted runner label is declared in | |
| # .github/actionlint.yaml. The empty-string choice-input defaults | |
| # (used as "run all / none" sentinels) are accepted by GitHub Actions | |
| # but flagged by actionlint's stricter parser, so that one rule is | |
| # ignored here. Shellcheck integration is disabled (-shellcheck=) | |
| # because the bench run: scripts rely on intentional word-splitting of | |
| # multi-flag variables (e.g. $SEQ_ARGS, $PARALLEL_ARGS, $PROVIDER_FLAG). | |
| - name: actionlint | |
| uses: docker://rhysd/actionlint:1.7.12 | |
| with: | |
| args: -color -ignore "string should not be empty" -shellcheck= |