✅ Add node 22 to the test matrix #263
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: Node.JS test and lint | |
on: | |
pull_request: | |
push: | |
branches: | |
- master | |
- dev | |
workflow_dispatch: | |
jobs: | |
nodejs-test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
# Remember to update README.md and package.json when updating the version matrix | |
version: [16, 18, 20, 22] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.version }} | |
cache: "npm" | |
- name: Install dependencies | |
run: npm ci | |
- name: Lint | |
run: npm run lint | |
- name: Build | |
run: npm run build | |
- name: Unit tests | |
run: npm run test | |
- name: Coveralls | |
if: ${{ success() }} | |
uses: coverallsapp/github-action@master | |
with: | |
parallel: true | |
flag-name: node-${{ matrix.version }} | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
path-to-lcov: "./coverage/lcov.info" | |
finish: | |
needs: nodejs-test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Coveralls Finished | |
uses: coverallsapp/github-action@master | |
with: | |
github-token: ${{ secrets.github_token }} | |
parallel-finished: true |