chore: use caching of actions/setup-node #505
Workflow file for this run
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 CI | |
on: | |
push: | |
branches: | |
- master | |
- main | |
- next | |
pull_request: | |
branches: | |
- '**' | |
jobs: | |
build: | |
name: Test on Node.js v${{ matrix.node-version }} and OS ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
node-version: [14.x, 16.x, 18.x, 20.x] | |
os: [ubuntu-latest, windows-latest, macOS-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: npm | |
- name: Install Dependencies | |
run: npm install | |
- name: Test | |
run: npm run test |