Follow-up to #4462: migrate remaining @var fixtures, DRY the prelude bare-@var scan, add warnings coverage #619
Workflow file for this run
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
| # Github actions workflow name | |
| name: CI | |
| # Triggers the workflow on push or pull request events | |
| on: | |
| push: | |
| branches: [main, master] | |
| pull_request: | |
| branches: [main, master] | |
| jobs: | |
| test: | |
| name: 'Tests on ${{matrix.os}} with Node "${{matrix.node}}"' | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| # Test all mainstream operating systems | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| node: ['current'] | |
| include: | |
| - os: ubuntu-latest | |
| node: 'lts/*' | |
| - os: ubuntu-latest | |
| node: 'lts/-1' | |
| - os: ubuntu-latest | |
| node: 'lts/-2' | |
| - os: ubuntu-latest | |
| node: 'lts/-3' | |
| runs-on: ${{ matrix.os }} | |
| # This has copy/paste steps and should be refactored using DRY | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node }} | |
| cache: 'pnpm' | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile --ignore-scripts | |
| - name: Print put node & npm version | |
| run: node --version && pnpm --version | |
| - name: Run node tests (ESM + CJS) | |
| run: pnpm run test:node | |
| copilot-review: | |
| name: Request Copilot review | |
| runs-on: ubuntu-latest | |
| continue-on-error: true | |
| if: github.event_name == 'pull_request' && (github.event.action == 'opened' || github.event.action == 'reopened') | |
| permissions: | |
| pull-requests: write | |
| steps: | |
| - name: Request Copilot review | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| gh api \ | |
| --method POST \ | |
| -H "Accept: application/vnd.github+json" \ | |
| /repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/requested_reviewers \ | |
| -f "reviewers[]=copilot-pull-request-reviewer" \ | |
| || echo "::warning::Could not request Copilot review (the token may lack pull-requests: write access, or Copilot PR reviews may not be enabled for this repository)" |