Include latest Node.js version in test matrix #13
This file contains 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] | |
pull_request: | |
branches: [main] | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup Node.js 16.x | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 16.x | |
- name: Install dependencies | |
run: npm ci | |
- name: Run linter | |
run: npm run lint | |
test: | |
needs: lint | |
strategy: | |
fail-fast: false | |
matrix: | |
node-version: ["16", "18", "20", "latest"] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Install dependencies | |
run: npm ci | |
- name: Run tests | |
run: npm test |