Skip to content

Commit 034b07e

Browse files
committed
chore: upgrade Playwright to version 1.40.1 and update deployment workflow
- Updated Playwright and Playwright Core dependencies to version 1.40.1 in package.json and package-lock.json for improved features and bug fixes. - Modified the deployment workflow to install the updated Playwright version, ensuring consistency across environments. - Enhanced caching strategy for npm and Playwright browsers to optimize installation efficiency.
1 parent 55bf435 commit 034b07e

3 files changed

Lines changed: 27 additions & 39 deletions

File tree

.github/workflows/deployment.yml

Lines changed: 12 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: Tests and publishing
22
env:
33
FORCE_COLOR: 1
4+
PLAYWRIGHT_BROWSERS_PATH: 0
45
on:
56
push:
67
branches:
@@ -26,29 +27,22 @@ jobs:
2627
node-version: 18
2728
- uses: actions/cache@v3
2829
with:
29-
path: ~/.npm
30-
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
30+
path: |
31+
~/.npm
32+
node_modules/.cache/ms-playwright
33+
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}-playwright-1.40.1
3134
restore-keys: |
3235
${{ runner.os }}-node-
33-
- name: Get Playwright version
34-
id: playwright-version
35-
run: echo "PLAYWRIGHT_VERSION=$(node -p "require('./package.json').devDependencies.playwright")" >> $GITHUB_OUTPUT
36-
- name: Cache Playwright browsers
37-
uses: actions/cache@v3
38-
id: playwright-cache
39-
with:
40-
path: ~/.cache/ms-playwright
41-
key: ${{ runner.os }}-playwright-${{ steps.playwright-version.outputs.PLAYWRIGHT_VERSION }}
4236
- name: Install dependencies
4337
run: |
4438
rm -f package-lock.json
4539
npm install
4640
- name: Install Playwright browsers
4741
run: |
4842
echo "Installing Playwright browsers..."
49-
npx playwright@1.25.2 install --with-deps
43+
npx playwright@1.40.1 install --with-deps
5044
echo "Verifying installation..."
51-
ls -la ~/.cache/ms-playwright/ || echo "No playwright cache found"
45+
ls -la node_modules/.cache/ms-playwright/ || echo "No playwright cache found in node_modules"
5246
- name: Run tests
5347
run: npm test
5448
test_win:
@@ -65,27 +59,19 @@ jobs:
6559
node-version: 18
6660
- uses: actions/cache@v3
6761
with:
68-
path: ~/.npm
69-
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
62+
path: |
63+
~/.npm
64+
node_modules/.cache/ms-playwright
65+
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}-playwright-1.40.1
7066
restore-keys: |
7167
${{ runner.os }}-node-
72-
- name: Get Playwright version
73-
id: playwright-version
74-
run: echo "PLAYWRIGHT_VERSION=$(node -p "require('./package.json').devDependencies.playwright")" >> $env:GITHUB_OUTPUT
75-
shell: pwsh
76-
- name: Cache Playwright browsers
77-
uses: actions/cache@v3
78-
id: playwright-cache
79-
with:
80-
path: ~/.cache/ms-playwright
81-
key: ${{ runner.os }}-playwright-${{ steps.playwright-version.outputs.PLAYWRIGHT_VERSION }}
8268
- name: Install dependencies
8369
run: |
8470
if (Test-Path package-lock.json) { del package-lock.json }
8571
npm install
8672
shell: pwsh
8773
- name: Install Playwright browsers
88-
run: npx playwright@1.25.2 install --with-deps
74+
run: npx playwright@1.40.1 install --with-deps
8975
- name: Run tests
9076
run: npm test
9177
tag:

package-lock.json

Lines changed: 14 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
"esm": "^3.2.25",
6464
"husky": "^7.0.2",
6565
"lint-staged": "^11.1.2",
66-
"playwright": "1.25.2",
66+
"playwright": "1.40.1",
6767
"rimraf": "^5.0.5",
6868
"sinon": "^11.1.2",
6969
"typescript": "^4.4.3",

0 commit comments

Comments
 (0)