Skip to content

Commit f684589

Browse files
authored
Revert "chore(repo): Update CI caching strategy" (clerk#3586)
1 parent f8c8a7c commit f684589

3 files changed

Lines changed: 14 additions & 28 deletions

File tree

.changeset/new-geese-watch.md

Lines changed: 0 additions & 2 deletions
This file was deleted.

.github/actions/init/action.yml

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -108,27 +108,14 @@ runs:
108108
- name: Setup NodeJS ${{ inputs.node-version }}
109109
uses: actions/setup-node@v4
110110
with:
111+
cache: 'npm'
111112
node-version: ${{ inputs.node-version }}
112113
registry-url: ${{ inputs.registry-url }}
113114

114-
- name: Restore node_modules
115-
id: cache-node-modules
116-
uses: actions/cache/restore@v3
117-
with:
118-
path: node_modules
119-
key: ${{ runner.os }}-npm-${{ hashFiles('package-lock.json') }}-${{ inputs.node-version }}
120-
121115
- name: Install NPM Dependencies
122-
if: steps.cache-node-modules.outputs.cache-hit != 'true' # Don't run if it's an **exact** match
123-
run: mkdir node_modules && npm ci --audit=false --fund=false --prefer-offline && npm prune
116+
run: mkdir node_modules && npm ci --cache /home/runner/.npm --audit=false --fund=false --prefer-offline
124117
shell: bash
125118

126-
- name: Save node_modules
127-
uses: actions/cache/save@v3
128-
with:
129-
path: node_modules
130-
key: ${{ steps.cache-node-modules.outputs.cache-primary-key }}
131-
132119
- name: Get Playwright Version
133120
if: inputs.playwright-enabled == 'true'
134121
shell: bash

.github/workflows/ci.yml

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
turbo-token: ${{ secrets.TURBO_TOKEN }}
4242

4343
- name: List node_modules
44-
run: npm ls --package-lock-only
44+
run: npm ls
4545
shell: bash
4646

4747
- name: Require Changeset
@@ -166,16 +166,6 @@ jobs:
166166
fetch-depth: 0
167167
show-progress: false
168168

169-
- name: Setup
170-
id: config
171-
uses: ./.github/actions/init
172-
with:
173-
node-version: ${{ env.NODE_VERSION }}
174-
turbo-signature: ${{ secrets.TURBO_REMOTE_CACHE_SIGNATURE_KEY }}
175-
turbo-team: ${{ vars.TURBO_TEAM }}
176-
turbo-token: ${{ secrets.TURBO_TOKEN }}
177-
playwright-enabled: true
178-
179169
- name: Task Status
180170
id: task-status
181171
env:
@@ -189,6 +179,17 @@ jobs:
189179
(npx turbo-ignore --task=test:integration:${{ matrix.test-name }} --fallback=${{ github.base_ref || 'refs/heads/main' }}) || AFFECTED=1
190180
echo "affected=${AFFECTED}" >> $GITHUB_OUTPUT
191181
182+
- name: Setup
183+
if: ${{ steps.task-status.outputs.affected == '1' }}
184+
id: config
185+
uses: ./.github/actions/init
186+
with:
187+
node-version: ${{ env.NODE_VERSION }}
188+
turbo-signature: ${{ secrets.TURBO_REMOTE_CACHE_SIGNATURE_KEY }}
189+
turbo-team: ${{ vars.TURBO_TEAM }}
190+
turbo-token: ${{ secrets.TURBO_TOKEN }}
191+
playwright-enabled: true
192+
192193
- name: Verdaccio
193194
if: ${{ steps.task-status.outputs.affected == '1' }}
194195
uses: ./.github/actions/verdaccio

0 commit comments

Comments
 (0)