Update actions/setup-node action to v4 #534
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: | |
pull_request: | |
paths: | |
- 'index.js' | |
- 'package-lock.json' | |
- '.github/workflows/test.yml' | |
jobs: | |
test: | |
name: Test | |
env: | |
CI: true | |
HUSKY_SKIP_INSTALL: true | |
FORCE_COLOR: 2 | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest, macOS-latest] | |
node: [12.x, 14.x, 16.x] | |
exclude: | |
# On Windows, run tests with only the LTS environments. | |
- os: windows-latest | |
node: 12.x | |
- os: windows-latest | |
node: 14.x | |
# On macOS, run tests with only the LTS environments. | |
- os: macOS-latest | |
node: 12.x | |
- os: macOS-latest | |
node: 1.x | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node }} | |
- run: npm ci | |
- run: node --throw-deprecation --trace-warnings --expose-gc node_modules/jest/bin/jest --forceExit --colors --logHeapUsage --runInBand --ci --detectOpenHandles --coverage | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v4 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
file: ./coverage/coverage-final.json | |
name: ${{ matrix.os }} | |
fail_ci_if_error: true |