From d5003c15aac671d52f1f78375a021a95bb9bb9e6 Mon Sep 17 00:00:00 2001 From: Tim Shamilov Date: Sat, 2 Dec 2023 02:33:59 -0500 Subject: [PATCH] add npm caching --- .github/workflows/alpha-npm.yml | 5 +++-- .github/workflows/docs-ci.yml | 5 +++-- .github/workflows/docs-publish.yml | 7 ++++--- .github/workflows/release-npm.yml | 5 +++-- .github/workflows/scorecard.yml | 4 ++-- .github/workflows/tests-ci.yml | 19 +++++++++++-------- 6 files changed, 26 insertions(+), 19 deletions(-) diff --git a/.github/workflows/alpha-npm.yml b/.github/workflows/alpha-npm.yml index 57d95d086..abfc6b0f7 100644 --- a/.github/workflows/alpha-npm.yml +++ b/.github/workflows/alpha-npm.yml @@ -25,13 +25,14 @@ jobs: steps: - name: Checkout source - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + uses: actions/checkout@v4 - name: Set up Node.js - uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0 + uses: actions/setup-node@v4 with: node-version: 18 registry-url: https://registry.npmjs.org/ + cache: 'npm' # Note - this is not required but it gives a clean failure prior to attempting a release if # the GH workflow runner is not authenticated with NPMjs.com diff --git a/.github/workflows/docs-ci.yml b/.github/workflows/docs-ci.yml index 40c82ca0c..c090d9273 100644 --- a/.github/workflows/docs-ci.yml +++ b/.github/workflows/docs-ci.yml @@ -16,13 +16,14 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout source - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + uses: actions/checkout@v4 - name: Set up Node.js - uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0 + uses: actions/setup-node@v4 with: node-version: 18 registry-url: https://registry.npmjs.org/ + cache: 'npm' - name: Install dependencies run: npm ci diff --git a/.github/workflows/docs-publish.yml b/.github/workflows/docs-publish.yml index f9ec9c786..4d3a63da3 100644 --- a/.github/workflows/docs-publish.yml +++ b/.github/workflows/docs-publish.yml @@ -25,13 +25,14 @@ jobs: steps: - name: Checkout source - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + uses: actions/checkout@v4 - name: Set up Node.js - uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0 + uses: actions/setup-node@v4 with: node-version: 18 registry-url: https://registry.npmjs.org/ + cache: 'npm' - name: Install dependencies run: | @@ -71,7 +72,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup Pages uses: actions/configure-pages@v3 diff --git a/.github/workflows/release-npm.yml b/.github/workflows/release-npm.yml index 2c2024d5d..8bdca4144 100644 --- a/.github/workflows/release-npm.yml +++ b/.github/workflows/release-npm.yml @@ -37,13 +37,14 @@ jobs: steps: - name: Checkout source - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + uses: actions/checkout@v4 - name: Set up Node.js - uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0 + uses: actions/setup-node@v4 with: node-version: 18 registry-url: https://registry.npmjs.org/ + cache: 'npm' - name: Install semver utility run: npm install -g semver@7.5.1 diff --git a/.github/workflows/scorecard.yml b/.github/workflows/scorecard.yml index 42d32ae0b..3f308dcb8 100644 --- a/.github/workflows/scorecard.yml +++ b/.github/workflows/scorecard.yml @@ -32,7 +32,7 @@ jobs: steps: - name: "Checkout code" - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0 + uses: actions/checkout@v4 with: persist-credentials: false @@ -59,7 +59,7 @@ jobs: # Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF # format to the repository Actions tab. - name: "Upload artifact" - uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # v3.1.0 + uses: actions/upload-artifact@v3 with: name: SARIF file path: results.sarif diff --git a/.github/workflows/tests-ci.yml b/.github/workflows/tests-ci.yml index a73dd70f6..0c55615e7 100644 --- a/.github/workflows/tests-ci.yml +++ b/.github/workflows/tests-ci.yml @@ -16,12 +16,13 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout source - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + uses: actions/checkout@v4 - name: Set up Node.js - uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0 + uses: actions/setup-node@v4 with: node-version: 18 + cache: 'npm' - name: Install dependencies run: npm ci @@ -47,13 +48,14 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout source - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + uses: actions/checkout@v4 - name: Set up Node.js - uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0 + uses: actions/setup-node@v4 with: node-version: 18 registry-url: https://registry.npmjs.org/ + cache: 'npm' - name: Install dependencies run: npm ci @@ -85,13 +87,14 @@ jobs: runs-on: macos-latest steps: - name: Checkout source - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + uses: actions/checkout@v4 - name: Set up Node.js - uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0 + uses: actions/setup-node@v4 with: node-version: 18 registry-url: https://registry.npmjs.org/ + cache: 'npm' - name: Install dependencies run: npm ci @@ -104,7 +107,7 @@ jobs: - name: Install docker run: brew install docker && brew install docker-compose # && colima start - + - name: Start docker run: colima start @@ -121,5 +124,5 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout source - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + uses: actions/checkout@v4 - uses: TBD54566975/sdk-development@v0.2.3