ci: update node versions for cI (#732) #1312
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, pull_request] | |
jobs: | |
ci: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [14.x, 16.x, 18.x, 20.x] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 10 | |
- name: Use Node.js 18.x to build | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18.x | |
- run: npm install | |
- run: npm run build | |
- run: rm -rf node_modules | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- run: npm install | |
- run: npm run test | |
env: | |
CI: true | |
- run: npm run lint | |
if: matrix.node-version == '18.x' | |
- run: npm run docs:diff | |
if: matrix.node-version == '18.x' | |
- run: npm run test:node | |
if: matrix.node-version >= '18.x' | |
- run: npm run test:pack | |
if: matrix.node-version >= '18.x' |