From 609d247a40f6f898df1b3ea668fb209064640c5d Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Fri, 3 Mar 2023 02:30:37 -0500 Subject: [PATCH] chore: use setup-node caching with npm ci PR-URL: https://github.com/isaacs/node-glob/pull/505 Credit: @nschonni Close: #505 Reviewed-by: @isaacs --- .github/workflows/ci.yml | 3 ++- .github/workflows/isaacs-makework.yml | 3 ++- .github/workflows/typedoc.yml | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c884730f..a2cd6998 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -31,9 +31,10 @@ jobs: uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} + cache: npm - name: Install dependencies - run: npm install + run: npm ci - name: Run Tests run: npm test -- -c -t0 --statements=80 --branches=80 --functions=80 --lines=80 diff --git a/.github/workflows/isaacs-makework.yml b/.github/workflows/isaacs-makework.yml index 8eb5e855..7f0a44a3 100644 --- a/.github/workflows/isaacs-makework.yml +++ b/.github/workflows/isaacs-makework.yml @@ -14,9 +14,10 @@ jobs: with: fetch-depth: 0 - name: Use Node.js - uses: actions/setup-node@v2.1.4 + uses: actions/setup-node@v3 with: node-version: 16.x + cache: npm - name: put repo in package.json run: node .github/workflows/package-json-repo.js - name: check in package.json if modified diff --git a/.github/workflows/typedoc.yml b/.github/workflows/typedoc.yml index e5bc0ef8..f4fe23d6 100644 --- a/.github/workflows/typedoc.yml +++ b/.github/workflows/typedoc.yml @@ -34,8 +34,9 @@ jobs: uses: actions/setup-node@v3 with: node-version: 18.x + cache: npm - name: Install dependencies - run: npm install + run: npm ci - name: Generate typedocs run: npm run typedoc