Skip to content

Commit e8e916c

Browse files
authored
Merge pull request #26 from yoavf/fix/caching
Remove browser caching to prevent compatibility issues with new Playwright versions
2 parents 2fe69da + 45fb404 commit e8e916c

File tree

14 files changed

+87527
-148140
lines changed

14 files changed

+87527
-148140
lines changed

CHANGELOG.md

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,15 @@
11
# Changelog
22

3-
## Unreleased
4-
5-
### Added
6-
- Automatic Playwright browser caching between runs
7-
- Smart cache key generation based on Playwright version, OS, architecture, and browser selection
8-
- Automatic cache restoration and saving with fallback to fresh installation
9-
10-
### Changed
11-
- Browser installation is now handled by a dedicated caching module
12-
- Improved error handling and logging for browser setup
13-
143
## [1.3.0-beta](https://github.com/yoavf/auto-pr-screenshots-action/compare/v1.2.0-beta...v1.3.0-beta) (2025-08-19)
154

16-
175
### Features
186

19-
* add browser caching ([d288d18](https://github.com/yoavf/auto-pr-screenshots-action/commit/d288d1822a85f2e4f3881dbbcb72795cb9d9814f))
207
* add release-please workflow ([8826e1c](https://github.com/yoavf/auto-pr-screenshots-action/commit/8826e1c0fc6919d93850eb687fcf214dbec0f29c))
218

22-
239
### Bug Fixes
2410

2511
* invalid yaml file for release-please workflow ([bed9ef2](https://github.com/yoavf/auto-pr-screenshots-action/commit/bed9ef2f91c5677d11a00ed0368e16645fb3ed4e))
2612
* invalid yaml file for workflow ([0cf0c26](https://github.com/yoavf/auto-pr-screenshots-action/commit/0cf0c268050ae8611417e6be8cf1db20bdd1c6f2))
27-
2813
## 1.1.0
2914

3015
- Improve the layout of the comment posted on the PR

README.md

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -29,22 +29,22 @@ jobs:
2929
permissions:
3030
contents: write # Required for pushing screenshots
3131
pull-requests: write # Required for posting comments
32-
32+
3333
steps:
3434
- uses: actions/checkout@v4
35-
35+
3636
- name: Setup Node.js
3737
uses: actions/setup-node@v4
3838
with:
3939
node-version: '20'
40-
40+
4141
# Start your app (example)
4242
- run: npm install
4343
- run: npm run dev &
44-
44+
4545
# Wait for your app to be ready
4646
- run: npx wait-on http://localhost:3000
47-
47+
4848
- name: Take screenshots
4949
uses: yoavf/auto-pr-screenshots@v1
5050
with:
@@ -76,14 +76,14 @@ screenshots:
7676
width: 1440
7777
height: 900
7878
wait_for: '[data-testid="hero-section"]'
79-
79+
8080
- name: home-mobile
8181
url: http://localhost:3000
8282
viewport:
8383
width: 390
8484
height: 844
8585
deviceScaleFactor: 3
86-
86+
8787
- name: dashboard
8888
url: http://localhost:3000/dashboard
8989
viewport:
@@ -154,12 +154,6 @@ Available step types:
154154
- `wait`: Wait for milliseconds
155155
- `wait_for`: Wait for element
156156

157-
## Performance Features
158-
159-
### Browser Caching
160-
161-
This action automatically caches Playwright browser binaries between runs. The caching works transparently without any configuration needed from users.
162-
163157
## Examples
164158

165159
### Next.js App
@@ -207,13 +201,13 @@ screenshots:
207201
viewport:
208202
width: 1440
209203
height: 900
210-
204+
211205
- name: about
212206
url: http://localhost:3000/about
213207
viewport:
214208
width: 1440
215209
height: 900
216-
210+
217211
- name: contact
218212
url: http://localhost:3000/contact
219213
viewport:
@@ -267,7 +261,7 @@ steps:
267261
selector: 'input[name="username"]'
268262
text: testuser
269263
- fill:
270-
selector: 'input[name="password"]'
264+
selector: 'input[name="password"]'
271265
text: testpass
272266
- click: 'button[type="submit"]'
273267
- wait_for: '[data-testid="user-dashboard"]'

action.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,32 +11,32 @@ inputs:
1111
description: 'URL of the frontend to capture screenshots from'
1212
required: false
1313
default: ''
14-
14+
1515
config-file:
1616
description: 'Path to configuration file (optional if URL is provided)'
1717
required: false
1818
default: '.github/screenshots.config.yml'
19-
19+
2020
browsers:
2121
description: 'Playwright browsers to use (chromium, firefox, webkit)'
2222
required: false
2323
default: 'chromium'
24-
24+
2525
skip-comment:
2626
description: 'Skip posting comment to PR'
2727
required: false
2828
default: 'false'
29-
29+
3030
fail-on-error:
3131
description: 'Fail the action if screenshot capture fails'
3232
required: false
3333
default: 'true'
34-
34+
3535
branch:
3636
description: 'Branch name for storing screenshots'
3737
required: false
3838
default: 'gh-screenshots'
39-
39+
4040
github-token:
4141
description: 'GitHub token for posting comments and pushing screenshots'
4242
required: true

0 commit comments

Comments
 (0)