Skip to content

Commit fb50df0

Browse files
authoredJul 29, 2024
ci: update test dependencies and remove playwright caching (#1907)
1 parent 4d13684 commit fb50df0

File tree

7 files changed

+144
-172
lines changed

7 files changed

+144
-172
lines changed
 

‎.github/workflows/ci.yml

+1-19
Original file line numberDiff line numberDiff line change
@@ -164,26 +164,8 @@ jobs:
164164
- name: Install dependencies
165165
run: pnpm install --no-frozen-lockfile
166166

167-
# https://github.com/vitejs/vite/blob/main/.github/workflows/ci.yml#L62
168-
# Install playwright's binary under custom directory to cache
169-
- name: Set Playwright path
170-
if: runner.os != 'Windows'
171-
run: echo "PLAYWRIGHT_BROWSERS_PATH=$HOME/.cache/playwright-bin" >> $GITHUB_ENV
172-
- name: Set Playwright path (windows)
173-
if: runner.os == 'Windows'
174-
run: echo "PLAYWRIGHT_BROWSERS_PATH=$HOME\.cache\playwright-bin" >> $env:GITHUB_ENV
175-
176-
- name: Cache Playwright's binary
177-
uses: actions/cache@v4
178-
with:
179-
# Playwright removes unused browsers automatically
180-
# So does not need to add playwright version to key
181-
key: ${{ runner.os }}-playwright-bin-v1
182-
path: ${{ env.PLAYWRIGHT_BROWSERS_PATH }}
183-
184167
- name: Install Playwright
185-
# does not need to explicitly set chromium after https://github.com/microsoft/playwright/issues/14862 is solved
186-
run: pnpm playwright install chromium
168+
run: pnpm playwright-core install chromium
187169

188170
- name: Restore dist cache
189171
uses: actions/cache@v4

‎e2e/helper.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { JSDOM } from 'jsdom'
22

3-
import type { Page } from 'playwright'
3+
import type { Page } from 'playwright-core'
44

55
export function sleep(delay: number) {
66
return new Promise(resolve => setTimeout(resolve, delay))

‎package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@
112112
"opener": "^1.5.2",
113113
"pathe": "^1.1.2",
114114
"picocolors": "^1.0.0",
115-
"playwright": "^1.34.0",
115+
"playwright-core": "^1.45.3",
116116
"prettier": "^3.2.5",
117117
"rc": "^1.2.8",
118118
"rimraf": "^6.0.0",
@@ -145,7 +145,7 @@
145145
"typescript": "^5.3.3",
146146
"typescript-eslint": "^7.5.0",
147147
"vitepress": "1.3.1",
148-
"vitest": "^2.0.0",
148+
"vitest": "^2.0.4",
149149
"vue": "3.4.33",
150150
"vue-i18n": "workspace:*"
151151
},

0 commit comments

Comments
 (0)