| 1 |
name: Tests |
| 2 |
|
| 3 |
on: [push, pull_request] |
| 4 |
|
| 5 |
env: |
| 6 |
FORCE_COLOR: 2 |
| 7 |
|
| 8 |
jobs: |
| 9 |
run: |
| 10 |
name: Node ${{ matrix.node }} on ${{ matrix.os }} |
| 11 |
runs-on: ${{ matrix.os }} |
| 12 |
|
| 13 |
strategy: |
| 14 |
fail-fast: false |
| 15 |
matrix: |
| 16 |
node: [16, 18, 20, 22, 24] |
| 17 |
os: [ubuntu-latest, windows-latest] |
| 18 |
|
| 19 |
steps: |
| 20 |
- name: Clone repository |
| 21 |
uses: actions/checkout@v4 |
| 22 |
|
| 23 |
- name: Set up Node.js |
| 24 |
uses: actions/setup-node@v4 |
| 25 |
with: |
| 26 |
node-version: ${{ matrix.node }} |
| 27 |
|
| 28 |
- name: Install npm dependencies |
| 29 |
run: npm i |
| 30 |
|
| 31 |
- name: Run tests |
| 32 |
run: npm test |
| 33 |
|
| 34 |
# We test multiple Windows shells because of prior stdout buffering issues |
| 35 |
# filed against Grunt. https://github.com/joyent/node/issues/3584 |
| 36 |
- name: Run PowerShell tests |
| 37 |
run: "npm test # PowerShell" # Pass comment to PS for easier debugging |
| 38 |
shell: powershell |
| 39 |
if: startsWith(matrix.os, 'windows') |