Skip to content

Commit 94dd5be

Browse files
committed
try using GitHub action to install playwright
1 parent a5d229a commit 94dd5be

File tree

1 file changed

+3
-21
lines changed

1 file changed

+3
-21
lines changed

.github/workflows/npm-publish.yml

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -20,33 +20,15 @@ jobs:
2020
- name: Install dependencies
2121
run: npm ci
2222

23-
- name: Get Playwright version
24-
id: playwright-version
25-
run: echo "version=$(npm list @playwright/test --json | jq -r '.dependencies["@playwright/test"].version')" >> $GITHUB_OUTPUT
23+
- name: Install Playwright
24+
uses: microsoft/playwright-github-action@v1
2625

27-
- name: Cache Playwright browsers
28-
uses: actions/cache@v4
29-
id: playwright-cache
30-
with:
31-
path: ~/.cache/ms-playwright
32-
key: ${{ runner.os }}-playwright-${{ steps.playwright-version.outputs.version }}
33-
restore-keys: |
34-
${{ runner.os }}-playwright-
35-
36-
- name: Install Playwright browsers
37-
if: steps.playwright-cache.outputs.cache-hit != 'true'
26+
- name: Install Playwright Browsers
3827
run: npx playwright install --with-deps
3928

40-
- name: Install Playwright system dependencies
41-
if: steps.playwright-cache.outputs.cache-hit == 'true'
42-
run: npx playwright install-deps
43-
4429
- name: Run tests
4530
run: npm test
4631

47-
- name: Build
48-
run: npm run build
49-
5032
publish-npm:
5133
needs: build
5234
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)