From 84e8462dee87ef101fd7ea825029c75d995b7a34 Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Sun, 26 Mar 2023 01:24:55 -0400 Subject: [PATCH] ci: use setup-node caching with npm ci PR-URL: https://github.com/isaacs/node-mkdirp/pull/43 Credit: @nschonni Close: #43 Reviewed-by: @isaacs --- .github/workflows/ci.yml | 3 ++- .github/workflows/isaacs-makework.yml | 4 ++-- .github/workflows/static.yml | 5 +++-- .github/workflows/typedoc.yml | 5 +++-- 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 48f7364..e16b9cf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,10 +30,11 @@ jobs: uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} + cache: npm # Run the installer script - name: Install dependencies - run: npm install + run: npm ci # Run the tests - name: Run Tap tests diff --git a/.github/workflows/isaacs-makework.yml b/.github/workflows/isaacs-makework.yml index 8eb5e85..57615d5 100644 --- a/.github/workflows/isaacs-makework.yml +++ b/.github/workflows/isaacs-makework.yml @@ -10,11 +10,11 @@ jobs: makework: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 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 - name: put repo in package.json diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml index 63da5f0..b05d0ac 100644 --- a/.github/workflows/static.yml +++ b/.github/workflows/static.yml @@ -30,12 +30,13 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 - - name: Use Nodejs ${{ matrix.node-version }} + - name: Use Nodejs 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 - name: Setup Pages diff --git a/.github/workflows/typedoc.yml b/.github/workflows/typedoc.yml index e5bc0ef..bbf082f 100644 --- a/.github/workflows/typedoc.yml +++ b/.github/workflows/typedoc.yml @@ -30,12 +30,13 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 - - name: Use Nodejs ${{ matrix.node-version }} + - name: Use Nodejs 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