Skip to content

Commit be9abef

Browse files
committed
ci: remove unnecessary dist caching
Tests run against source (via vitest alias), not built dist. Each job now simply installs deps (pnpm caches via setup-node) and runs. Removes: - dist artifact caching/restoring - Platform-specific cache key complexity - Cache miss failures Build job still verifies build works, but output isn't reused.
1 parent 469ec3e commit be9abef

File tree

1 file changed

+7
-46
lines changed

1 file changed

+7
-46
lines changed

.github/workflows/ci.yml

Lines changed: 7 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ name: 🚀 CI Pipeline
22

33
# Optimized CI with:
44
# - Separate lint job (1x instead of 6x)
5-
# - Cached build artifacts (5 rebuilds eliminated)
5+
# - Separate build verification job
66
# - Parallel job execution
7-
# - Smart test runner with change detection
7+
# - pnpm dependency caching via setup-node
88

99
on:
1010
push:
@@ -70,14 +70,6 @@ jobs:
7070
- name: Build project
7171
run: pnpm run build
7272

73-
- name: Cache build artifacts
74-
uses: actions/cache/save@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
75-
with:
76-
path: |
77-
dist
78-
node_modules
79-
key: build-${{ github.sha }}-${{ runner.os }}
80-
8173
# Test matrix - reuses build artifacts (main test suite)
8274
test:
8375
name: Test
@@ -104,26 +96,7 @@ jobs:
10496
node-version: ${{ matrix.node }}
10597
cache: 'pnpm'
10698

107-
- name: Restore build artifacts (Linux)
108-
if: runner.os == 'Linux'
109-
uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
110-
with:
111-
path: |
112-
dist
113-
node_modules
114-
key: build-${{ github.sha }}-Linux
115-
fail-on-cache-miss: true
116-
117-
- name: Restore build artifacts (Windows)
118-
if: runner.os == 'Windows'
119-
uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
120-
with:
121-
path: dist
122-
key: build-${{ github.sha }}-Linux
123-
fail-on-cache-miss: true
124-
125-
- name: Install dependencies (Windows)
126-
if: runner.os == 'Windows'
99+
- name: Install dependencies
127100
run: pnpm install --frozen-lockfile
128101

129102
- name: Run main tests
@@ -150,14 +123,8 @@ jobs:
150123
node-version: 22
151124
cache: 'pnpm'
152125

153-
- name: Restore build artifacts
154-
uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
155-
with:
156-
path: |
157-
dist
158-
node_modules
159-
key: build-${{ github.sha }}-Linux
160-
fail-on-cache-miss: true
126+
- name: Install dependencies
127+
run: pnpm install --frozen-lockfile
161128

162129
- name: Run isolated tests
163130
run: pnpm exec vitest --config .config/vitest.config.isolated.mts run
@@ -183,14 +150,8 @@ jobs:
183150
node-version: 22
184151
cache: 'pnpm'
185152

186-
- name: Restore build artifacts
187-
uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
188-
with:
189-
path: |
190-
dist
191-
node_modules
192-
key: build-${{ github.sha }}-${{ runner.os }}
193-
fail-on-cache-miss: true
153+
- name: Install dependencies
154+
run: pnpm install --frozen-lockfile
194155

195156
- name: Run type check
196157
run: pnpm run check

0 commit comments

Comments
 (0)