Skip to content

Commit 673712b

Browse files
authored
Merge pull request #1218 from objectstack-ai/claude/check-ci-cache-processes
fix: add missing Turbo and Playwright cache configurations to CI workflows
2 parents b6c64c9 + 7a4e907 commit 673712b

File tree

2 files changed

+48
-0
lines changed

2 files changed

+48
-0
lines changed

.github/workflows/ci.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,14 @@ jobs:
3232
node-version: '20.x'
3333
cache: 'pnpm'
3434

35+
- name: Turbo Cache
36+
uses: actions/cache@v5
37+
with:
38+
path: node_modules/.cache/turbo
39+
key: turbo-${{ runner.os }}-${{ github.sha }}
40+
restore-keys: |
41+
turbo-${{ runner.os }}-
42+
3543
- name: Install dependencies
3644
run: pnpm install --frozen-lockfile
3745

@@ -120,6 +128,14 @@ jobs:
120128
node-version: '20.x'
121129
cache: 'pnpm'
122130

131+
- name: Turbo Cache
132+
uses: actions/cache@v5
133+
with:
134+
path: node_modules/.cache/turbo
135+
key: turbo-${{ runner.os }}-${{ github.sha }}
136+
restore-keys: |
137+
turbo-${{ runner.os }}-
138+
123139
- name: Install dependencies
124140
run: pnpm install --frozen-lockfile
125141

@@ -128,9 +144,25 @@ jobs:
128144
with:
129145
name: build-output
130146

147+
- name: Get Playwright version
148+
id: playwright-version
149+
run: echo "version=$(pnpm list @playwright/test --depth=0 --json | jq -r '.[0].devDependencies["@playwright/test"].version')" >> $GITHUB_OUTPUT
150+
151+
- name: Cache Playwright browsers
152+
uses: actions/cache@v5
153+
id: playwright-cache
154+
with:
155+
path: ~/.cache/ms-playwright
156+
key: playwright-${{ runner.os }}-${{ steps.playwright-version.outputs.version }}
157+
131158
- name: Install Playwright browsers
159+
if: steps.playwright-cache.outputs.cache-hit != 'true'
132160
run: pnpm exec playwright install --with-deps chromium
133161

162+
- name: Install Playwright system dependencies
163+
if: steps.playwright-cache.outputs.cache-hit == 'true'
164+
run: pnpm exec playwright install-deps chromium
165+
134166
- name: Run E2E tests
135167
run: pnpm test:e2e --project=chromium
136168

.github/workflows/storybook-tests.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,25 @@ jobs:
5858
- name: Build Storybook
5959
run: pnpm storybook:build
6060

61+
- name: Get Playwright version
62+
id: playwright-version
63+
run: echo "version=$(pnpm list @playwright/test --depth=0 --json | jq -r '.[0].devDependencies["@playwright/test"].version')" >> $GITHUB_OUTPUT
64+
65+
- name: Cache Playwright browsers
66+
uses: actions/cache@v5
67+
id: playwright-cache
68+
with:
69+
path: ~/.cache/ms-playwright
70+
key: playwright-${{ runner.os }}-${{ steps.playwright-version.outputs.version }}
71+
6172
- name: Install Playwright Browsers
73+
if: steps.playwright-cache.outputs.cache-hit != 'true'
6274
run: pnpm exec playwright install --with-deps chromium
6375

76+
- name: Install Playwright system dependencies
77+
if: steps.playwright-cache.outputs.cache-hit == 'true'
78+
run: pnpm exec playwright install-deps chromium
79+
6480
- name: Run Storybook tests
6581
run: pnpm storybook:ci
6682

0 commit comments

Comments
 (0)