chore(deps): update actions/setup-node action to v4 #79
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 CI | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version-file: .nvmrc | |
cache: npm | |
- run: npm ci | |
- run: npm run typecheck | |
- run: npm run lint | |
test: | |
needs: lint | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node: [16, 18] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node }} | |
- run: npm ci | |
- name: Run test | |
if: matrix.node != 18 | |
run: npm test | |
- name: Run test with coverage | |
if: matrix.node == 18 | |
run: npm run test:cov | |
- uses: codecov/codecov-action@v4 | |
if: matrix.node == 18 |