From 327574e8437a68a3372bb68c5105d7592d180f2c Mon Sep 17 00:00:00 2001 From: Anton Gilgur Date: Tue, 10 May 2022 19:20:34 -0400 Subject: [PATCH] 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 --- .github/workflows/nodejs.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index 021d6ec3..b8db396e 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -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