Skip to content

Commit

Permalink
NEXT-33446 - enable caching
Browse files Browse the repository at this point in the history
  • Loading branch information
Haberkamp committed Feb 6, 2024
1 parent 26e262d commit b748a53
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 88 deletions.
17 changes: 5 additions & 12 deletions .github/workflows/chromatic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,17 @@ jobs:
with:
fetch-depth: 0 # Required for the chromatic CLI to work

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'

- uses: pnpm/action-setup@v2
with:
version: 8

# - name: Retrieve the cached main "node_modules" directory (if present)
# uses: actions/cache@v3
# id: node-cache-main
# with:
# path: node_modules
# key: node-modules-main-${{ runner.os }}-${{ hashFiles('package-lock.json') }}
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'pnpm'

- name: Install main dependencies (if the cached directory was not found)
# if: steps.node-cache-main.outputs.cache-hit != 'true'
run: pnpm ci

- name: Publish to Chromatic
Expand Down
19 changes: 6 additions & 13 deletions .github/workflows/deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,17 @@ jobs:
- name: Checkout the repository
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'

- uses: pnpm/action-setup@v2
with:
version: 8

# - name: Retrieve the cached main "node_modules" directory (if present)
# uses: actions/cache@v3
# id: node-cache-main
# with:
# path: node_modules
# key: node-modules-main-${{ runner.os }}-${{ hashFiles('package-lock.json') }}
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'pnpm'

- name: Install main dependencies (if the cached directory was not found)
# if: steps.node-cache-main.outputs.cache-hit != 'true'
- name: Install main dependencies
run: pnpm ci

- name: Create the static pages directory locally in CI
Expand Down
19 changes: 6 additions & 13 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,24 +13,17 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'

- uses: pnpm/action-setup@v2
with:
version: 8

# - name: Retrieve the cached "node_modules" directory (if present)
# uses: actions/cache@v3
# id: node-cache
# with:
# path: node_modules
# key: node-modules-${{ runner.os }}-${{ hashFiles('package-lock.json') }}
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'pnpm'

- name: Install dependencies (if the cached directory was not found)
# if: steps.node-cache.outputs.cache-hit != 'true'
- name: Install dependencies
run: pnpm ci

- name: Build distributed files
Expand Down
19 changes: 6 additions & 13 deletions .github/workflows/preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,24 +17,17 @@ jobs:
- name: Checkout the repository
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'

- uses: pnpm/action-setup@v2
with:
version: 8

# - name: Retrieve the cached main "node_modules" directory (if present)
# uses: actions/cache@v3
# id: node-cache-main
# with:
# path: node_modules
# key: node-modules-main-${{ runner.os }}-${{ hashFiles('package-lock.json') }}
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'pnpm'

- name: Install main dependencies (if the cached directory was not found)
# if: steps.node-cache-main.outputs.cache-hit != 'true'
- name: Install main dependencies
run: pnpm install

- name: Create the static pages directory locally in CI
Expand Down
55 changes: 18 additions & 37 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,24 +17,17 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'

- uses: pnpm/action-setup@v2
with:
version: 8

# - name: Retrieve the cached "node_modules" directory (if present)
# uses: actions/cache@v3
# id: node-cache
# with:
# path: node_modules
# key: node-modules-${{ runner.os }}-${{ hashFiles('package-lock.json') }}
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'pnpm'

- name: Install dependencies (if the cached directory was not found)
# if: steps.node-cache.outputs.cache-hit != 'true'
- name: Install dependencies
run: pnpm i

- name: Check formatting
Expand All @@ -53,24 +46,17 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'

- uses: pnpm/action-setup@v2
with:
version: 8

# - name: Retrieve the cached "node_modules" directory (if present)
# uses: actions/cache@v3
# id: node-cache
# with:
# path: node_modules
# key: node-modules-${{ runner.os }}-${{ hashFiles('package-lock.json') }}
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'pnpm'

- name: Install dependencies (if the cached directory was not found)
# if: steps.node-cache.outputs.cache-hit != 'true'
- name: Install dependencies
run: pnpm install

- name: unit
Expand All @@ -84,22 +70,17 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4

- uses: pnpm/action-setup@v2
with:
version: 8

# - name: Retrieve the cached "node_modules" directory (if present)
# uses: actions/cache@v3
# id: node-cache
# with:
# path: node_modules
# key: node-modules-${{ runner.os }}-${{ hashFiles('package-lock.json') }}
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'pnpm'

- name: Install dependencies (if the cached directory was not found)
# if: steps.node-cache.outputs.cache-hit != 'true'
- name: Install dependencies
run: pnpm install

- name: Install Playwright
Expand Down

0 comments on commit b748a53

Please sign in to comment.