Merge pull request #2536 from fengmk2/patch-1 #699
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] | |
jobs: | |
test: | |
name: test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Use Node.js | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 16.x | |
- name: Get npm cache directory | |
id: npm-cache-dir | |
run: | | |
echo "::set-output name=dir::$(npm config get cache)" | |
- uses: actions/cache@v2 | |
with: | |
path: ${{ steps.npm-cache-dir.outputs.dir }} | |
key: v1-${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
v1-${{ runner.os }}-node- | |
- name: npm install | |
run: | | |
npm ci | |
- name: lint | |
run: | | |
npm run lint | |
- name: test | |
run: | | |
npm test | |
env: | |
CI: true |