From 5cb5e37270da0d34563ec649c5703e3dd17f6c19 Mon Sep 17 00:00:00 2001 From: Vince Grassia <593223+vgrassia@users.noreply.github.com> Date: Wed, 16 Mar 2022 11:18:47 -0400 Subject: [PATCH] Add Node caching (#1549) --- .github/workflows/build.yml | 55 ++++++++++--------------------------- 1 file changed, 15 insertions(+), 40 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 38983bd6ee..7786c27668 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -77,17 +77,12 @@ jobs: _VERSION: ${{ needs.setup.outputs.version }} steps: - name: Set up Node - uses: actions/setup-node@46071b5c7a2e0c34e49c3cb8a0e792e86e18d5ea + uses: actions/setup-node@9ced9a43a244f3ac94f13bfd896db8c8f30da67a # v3.0.0 with: + cache: 'npm' + cache-dependency-path: '**/package-lock.json' node-version: "16" - - name: Cache npm - id: npm-cache - uses: actions/cache@c64c572235d810460d0d6876e9c705ad5002b353 # v2.1.6 - with: - path: "~/.npm" - key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }} - - name: Print environment run: | whoami @@ -127,17 +122,12 @@ jobs: _VERSION: ${{ needs.setup.outputs.version }} steps: - name: Set up Node - uses: actions/setup-node@46071b5c7a2e0c34e49c3cb8a0e792e86e18d5ea + uses: actions/setup-node@9ced9a43a244f3ac94f13bfd896db8c8f30da67a # v3.0.0 with: + cache: 'npm' + cache-dependency-path: '**/package-lock.json' node-version: "16" - - name: Cache npm - id: npm-cache - uses: actions/cache@c64c572235d810460d0d6876e9c705ad5002b353 # v2.1.6 - with: - path: "~/.npm" - key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }} - - name: Print environment run: | whoami @@ -177,17 +167,12 @@ jobs: _VERSION: ${{ needs.setup.outputs.version }} steps: - name: Set up Node - uses: actions/setup-node@46071b5c7a2e0c34e49c3cb8a0e792e86e18d5ea + uses: actions/setup-node@9ced9a43a244f3ac94f13bfd896db8c8f30da67a # v3.0.0 with: + cache: 'npm' + cache-dependency-path: '**/package-lock.json' node-version: "16" - - name: Cache npm - id: npm-cache - uses: actions/cache@c64c572235d810460d0d6876e9c705ad5002b353 # v2.1.6 - with: - path: "~/.npm" - key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }} - - name: Print environment run: | whoami @@ -309,17 +294,12 @@ jobs: - lint steps: - name: Set up Node - uses: actions/setup-node@46071b5c7a2e0c34e49c3cb8a0e792e86e18d5ea + uses: actions/setup-node@9ced9a43a244f3ac94f13bfd896db8c8f30da67a # v3.0.0 with: + cache: 'npm' + cache-dependency-path: '**/package-lock.json' node-version: "16" - - name: Cache npm - id: npm-cache - uses: actions/cache@c64c572235d810460d0d6876e9c705ad5002b353 # v2.1.6 - with: - path: "~/.npm" - key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }} - - name: Print environment run: | whoami @@ -406,16 +386,11 @@ jobs: with: nuget-version: "latest" - - name: Cache npm - id: npm-cache - uses: actions/cache@c64c572235d810460d0d6876e9c705ad5002b353 # v2.1.6 - with: - path: "~/.npm" - key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }} - - name: Set up Node - uses: actions/setup-node@46071b5c7a2e0c34e49c3cb8a0e792e86e18d5ea + uses: actions/setup-node@9ced9a43a244f3ac94f13bfd896db8c8f30da67a # v3.0.0 with: + cache: 'npm' + cache-dependency-path: '**/package-lock.json' node-version: "16" - name: Print environment