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
0 commit comments