optim(ci): use npm ci for install and cache npm (#323)

- `npm ci` is installation for, well, CI, and is a good bit faster
  - c.f. https://docs.npmjs.com/cli/v8/commands/npm-ci

- cache `npm` installation with `setup-node` for speedier installs
  - upgrade `setup-node` as this was released in v2.2.0:
    https://github.com/actions/setup-node/releases/tag/v2.2.0
This commit is contained in:
Anton Gilgur 2022-05-10 19:20:34 -04:00 committed by GitHub
parent 7af216b463
commit 327574e843
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -22,10 +22,11 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- run: npm install
cache: 'npm'
- run: npm ci
- run: npm run build
- run: npm run build-self
- run: npm run build-self