ci: allow CI to be dispatched against a ref (#36) #106
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: | |
| push: | |
| branches: [main, v7] | |
| pull_request: | |
| branches: [main, v7] | |
| # Lets another workflow start this one against a specific ref. | |
| # | |
| # The spec-drift job opens its PR with GITHUB_TOKEN, and GitHub does not | |
| # start workflow runs from GITHUB_TOKEN-raised events — so the required | |
| # checks never report and the PR is blocked on a report it can never get. | |
| # workflow_dispatch and repository_dispatch are the two documented | |
| # exceptions to that rule, so drift can dispatch this run itself. | |
| workflow_dispatch: | |
| jobs: | |
| test: | |
| name: Test (Node ${{ matrix.node }}) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| node: [20, 22, 24] | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: actions/setup-node@v7 | |
| with: | |
| node-version: ${{ matrix.node }} | |
| cache: npm | |
| - run: npm ci | |
| - run: npm run lint | |
| - run: npx prettier --check . | |
| - run: npm run typecheck | |
| - run: npm run build | |
| - run: npm test |