Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Workflows: Use built-in cache support in actions/setup-node #8189

Merged
merged 1 commit into from Jul 5, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
32 changes: 4 additions & 28 deletions .github/workflows/build-and-deploy.yml
Expand Up @@ -58,20 +58,8 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v2.2.0
with:
node-version: '${{ steps.nvm.outputs.NVMRC }}'

- name: Cache node modules
uses: pat-s/always-upload-cache@v2.1.5
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
env:
cache-name: cache-node-modules
node-version: ${{ steps.nvm.outputs.NVMRC }}
cache: npm

- name: Bundle size check
uses: preactjs/compressed-size-action@v2
Expand All @@ -98,20 +86,8 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v2.2.0
with:
node-version: '${{ steps.nvm.outputs.NVMRC }}'

- name: Cache node modules
uses: pat-s/always-upload-cache@v2.1.5
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
env:
cache-name: cache-node-modules
node-version: ${{ steps.nvm.outputs.NVMRC }}
cache: npm

- name: Setup PHP
uses: shivammathur/setup-php@v2
Expand Down
16 changes: 2 additions & 14 deletions .github/workflows/deploy-storybook.yml
Expand Up @@ -38,20 +38,8 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v2.2.0
with:
node-version: '${{ steps.nvm.outputs.NVMRC }}'

- name: Cache node modules
uses: pat-s/always-upload-cache@v2.1.5
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
env:
cache-name: cache-node-modules
node-version: ${{ steps.nvm.outputs.NVMRC }}
cache: npm

- name: Install dependencies
run: npm ci
Expand Down
16 changes: 2 additions & 14 deletions .github/workflows/lint-css-js-md.yml
Expand Up @@ -56,20 +56,8 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v2.2.0
with:
node-version: '${{ steps.nvm.outputs.NVMRC }}'

- name: Cache node modules
uses: pat-s/always-upload-cache@v2.1.5
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
env:
cache-name: cache-node-modules
node-version: ${{ steps.nvm.outputs.NVMRC }}
cache: npm

- name: Install dependencies
run: npm ci
Expand Down
16 changes: 2 additions & 14 deletions .github/workflows/lint-i18n.yml
Expand Up @@ -56,20 +56,8 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v2.2.0
with:
node-version: '${{ steps.nvm.outputs.NVMRC }}'

- name: Cache node modules
uses: pat-s/always-upload-cache@v2.1.3
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
env:
cache-name: cache-node-modules
node-version: ${{ steps.nvm.outputs.NVMRC }}
cache: npm

- name: Setup PHP
uses: shivammathur/setup-php@v2
Expand Down
48 changes: 6 additions & 42 deletions .github/workflows/plugin-release.yml
Expand Up @@ -201,20 +201,8 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v2.2.0
with:
node-version: '${{ steps.nvm.outputs.NVMRC }}'

- name: Cache node modules
uses: pat-s/always-upload-cache@v2.1.5
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
env:
cache-name: cache-node-modules
node-version: ${{ steps.nvm.outputs.NVMRC }}
cache: npm

- name: Install dependencies
run: npm ci
Expand Down Expand Up @@ -302,20 +290,8 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v2.2.0
with:
node-version: '${{ steps.nvm.outputs.NVMRC }}'

- name: Cache node modules
uses: pat-s/always-upload-cache@v2.1.5
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
env:
cache-name: cache-node-modules
node-version: ${{ steps.nvm.outputs.NVMRC }}
cache: npm

- name: Setup PHP
uses: shivammathur/setup-php@v2
Expand Down Expand Up @@ -524,20 +500,8 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v2.2.0
with:
node-version: '${{ steps.nvm.outputs.NVMRC }}'

- name: Cache node modules
uses: pat-s/always-upload-cache@v2.1.5
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
env:
cache-name: cache-node-modules
node-version: ${{ steps.nvm.outputs.NVMRC }}
cache: npm

- name: Install dependencies
run: npm ci
Expand Down
16 changes: 2 additions & 14 deletions .github/workflows/tests-e2e.yml
Expand Up @@ -73,20 +73,8 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v2.2.0
with:
node-version: '${{ steps.nvm.outputs.NVMRC }}'

- name: Cache node modules
uses: pat-s/always-upload-cache@v2.1.5
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
env:
cache-name: cache-node-modules
node-version: ${{ steps.nvm.outputs.NVMRC }}
cache: npm

- name: Setup PHP
uses: shivammathur/setup-php@v2
Expand Down
14 changes: 1 addition & 13 deletions .github/workflows/tests-karma-dashboard.yml
Expand Up @@ -53,19 +53,7 @@ jobs:
uses: actions/setup-node@v2.2.0
with:
node-version: ${{ steps.nvm.outputs.NVMRC }}

- name: Cache node modules
uses: pat-s/always-upload-cache@v2.1.5
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
env:
cache-name: cache-node-modules
cache: npm

# TODO: Remove need for `npm install puppeteer`.
- name: Install dependencies
Expand Down
14 changes: 1 addition & 13 deletions .github/workflows/tests-karma-editor.yml
Expand Up @@ -58,19 +58,7 @@ jobs:
uses: actions/setup-node@v2.2.0
with:
node-version: ${{ steps.nvm.outputs.NVMRC }}

- name: Cache node modules
uses: pat-s/always-upload-cache@v2.1.5
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
env:
cache-name: cache-node-modules
cache: npm

# TODO: Remove need for `npm install puppeteer`.
- name: Install dependencies
Expand Down
14 changes: 1 addition & 13 deletions .github/workflows/tests-unit-js.yml
Expand Up @@ -47,19 +47,7 @@ jobs:
uses: actions/setup-node@v2.2.0
with:
node-version: ${{ steps.nvm.outputs.NVMRC }}

- name: Cache node modules
uses: pat-s/always-upload-cache@v2.1.5
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
env:
cache-name: cache-node-modules
cache: npm

- name: Setup Jest cache
uses: actions/cache@v2.1.6
Expand Down
16 changes: 2 additions & 14 deletions .github/workflows/update-google-fonts.yml
Expand Up @@ -21,20 +21,8 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v2.2.0
with:
node-version: '${{ steps.nvm.outputs.NVMRC }}'

- name: Cache node modules
uses: pat-s/always-upload-cache@v2.1.5
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
env:
cache-name: cache-node-modules
node-version: ${{ steps.nvm.outputs.NVMRC }}
cache: npm

- name: Install dependencies
run: npm ci
Expand Down
16 changes: 2 additions & 14 deletions .github/workflows/update-templates.yml
Expand Up @@ -21,20 +21,8 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v2.2.0
with:
node-version: '${{ steps.nvm.outputs.NVMRC }}'

- name: Cache node modules
uses: pat-s/always-upload-cache@v2.1.5
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
env:
cache-name: cache-node-modules
node-version: ${{ steps.nvm.outputs.NVMRC }}
cache: npm

- name: Install dependencies
run: npm ci
Expand Down