ci: use npm ci to improve CI performance
This commit is contained in:
parent
51ca78d496
commit
2ffff0fa61
2 changed files with 49 additions and 25 deletions
30
.github/workflows/lint.yml
vendored
30
.github/workflows/lint.yml
vendored
|
|
@ -8,13 +8,23 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: 16.x
|
||||
- name: Install
|
||||
run: npm i
|
||||
- name: Lint
|
||||
run: npm run lint
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: 16.5.0
|
||||
|
||||
- name: Cache dependencies
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.npm
|
||||
key: npm-${{ hashFiles('package-lock.json') }}
|
||||
restore-keys: npm-
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Lint
|
||||
run: npm run lint
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue