Skip to content

Commit e6a2711

Browse files
playwright workflow cache
1 parent e6f2e0e commit e6a2711

File tree

2 files changed

+62
-35
lines changed

2 files changed

+62
-35
lines changed

.github/workflows/playwright.yml

+27
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,20 @@ on:
77
pull_request:
88
branches:
99
- "*"
10+
11+
# Allow updating snapshots during manual runs
12+
workflow_call:
13+
inputs:
14+
update-snapshots:
15+
description: "Update snapshots?"
16+
type: boolean
17+
18+
# Allow updating snapshots during automatic runs
19+
workflow_dispatch:
20+
inputs:
21+
update-snapshots:
22+
description: "Update snapshots?"
23+
type: boolean
1024
jobs:
1125
test:
1226
runs-on: ubuntu-latest
@@ -25,6 +39,18 @@ jobs:
2539
npm install
2640
npx playwright install --with-deps
2741
42+
- name: Set up cache
43+
id: cache
44+
uses: actions/cache@v4
45+
with:
46+
key: cache/${{github.repository}}/${{github.ref}}
47+
restore-keys: cache/${{github.repository}}/refs/heads/master
48+
path: .test/**
49+
50+
- name: Initialize snapshots
51+
if: ${{steps.cache.outputs.cache-hit != 'true' || inputs.update-snapshots == 'true'}}
52+
run: npx playwright test --update-snapshots --reporter html
53+
2854
- name: Test
2955
run: npx playwright test --ignore-snapshots
3056

@@ -35,3 +61,4 @@ jobs:
3561
name: playwright-report
3662
path: playwright-report/
3763
retention-days: 30
64+
overwrite: true

package.json

+35-35
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@
109109
"react-resize-detector": "^9.1.0",
110110
"react-responsive": "^9.0.2",
111111
"react-select": "^5.8.0",
112-
"react-spinners": "^0.13.8",
112+
"react-spinners": "^0.14.1",
113113
"react-table": "^7.8.0",
114114
"react-toastify": "^9.1.3",
115115
"react-transition-group": "^4.4.5",
@@ -122,69 +122,69 @@
122122
"vm-browserify": "^1.1.2"
123123
},
124124
"devDependencies": {
125-
"@babel/cli": "^7.24.1",
125+
"@babel/cli": "^7.24.8",
126126
"@babel/plugin-proposal-private-property-in-object": "^7.21.11",
127-
"@babel/plugin-transform-runtime": "^7.24.3",
128-
"@babel/runtime": "^7.24.4",
129-
"@chromatic-com/storybook": "^1.3.4",
130-
"@emotion/jest": "^11.11.0",
131-
"@playwright/test": "^1.43.1",
132-
"@storybook/addon-essentials": "^8.2.6",
133-
"@storybook/addon-interactions": "^8.2.6",
134-
"@storybook/addon-links": "^8.2.6",
135-
"@storybook/addon-themes": "^8.2.6",
136-
"@storybook/addon-webpack5-compiler-swc": "^1.0.4",
137-
"@storybook/blocks": "^8.2.6",
138-
"@storybook/react": "^8.2.6",
139-
"@storybook/react-webpack5": "^8.2.6",
140-
"@storybook/test": "^8.2.6",
127+
"@babel/plugin-transform-runtime": "^7.24.7",
128+
"@babel/runtime": "^7.25.0",
129+
"@chromatic-com/storybook": "^1.6.1",
130+
"@emotion/jest": "^11.13.0",
131+
"@playwright/test": "^1.46.0",
132+
"@storybook/addon-essentials": "^8.2.7",
133+
"@storybook/addon-interactions": "^8.2.7",
134+
"@storybook/addon-links": "^8.2.7",
135+
"@storybook/addon-themes": "^8.2.7",
136+
"@storybook/addon-webpack5-compiler-swc": "^1.0.5",
137+
"@storybook/blocks": "^8.2.7",
138+
"@storybook/react": "^8.2.7",
139+
"@storybook/react-webpack5": "^8.2.7",
140+
"@storybook/test": "^8.2.7",
141141
"@svgr/cli": "^8.1.0",
142142
"@svgr/webpack": "^8.1.0",
143-
"@testing-library/jest-dom": "^6.4.2",
143+
"@testing-library/jest-dom": "^6.4.8",
144144
"@testing-library/react": "^14.1.2",
145-
"@types/jest": "^29.5.10",
145+
"@types/jest": "^29.5.12",
146146
"babel-loader": "^8.3.0",
147147
"babel-plugin-inline-react-svg": "^2.0.2",
148148
"babel-plugin-optimize-clsx": "^2.6.2",
149149
"babel-preset-react-app": "^10.0.1",
150150
"child_process": "^1.0.2",
151151
"cross-env": "^7.0.3",
152-
"css-loader": "^6.8.1",
153-
"eslint": "8.54.0",
154-
"eslint-config-prettier": "^9.0.0",
152+
"css-loader": "^7.1.2",
153+
"eslint": "8.57.0",
154+
"eslint-config-prettier": "^9.1.0",
155155
"eslint-config-react-app": "^7.0.1",
156156
"eslint-formatter-pretty": "^5.0.0",
157-
"eslint-plugin-import": "^2.29.0",
158-
"eslint-plugin-jest": "^27.6.0",
159-
"eslint-plugin-jsx-a11y": "^6.8.0",
160-
"eslint-plugin-prettier": "^5.1.3",
161-
"eslint-plugin-react": "^7.33.2",
162-
"eslint-plugin-react-hooks": "^4.6.0",
157+
"eslint-plugin-import": "^2.29.1",
158+
"eslint-plugin-jest": "^28.7.0",
159+
"eslint-plugin-jsx-a11y": "^6.9.0",
160+
"eslint-plugin-prettier": "^5.2.1",
161+
"eslint-plugin-react": "^7.35.0",
162+
"eslint-plugin-react-hooks": "^4.6.2",
163163
"eslint-plugin-storybook": "^0.8.0",
164-
"eslint-plugin-testing-library": "^6.0.2",
164+
"eslint-plugin-testing-library": "^6.2.2",
165165
"fast-glob": "^3.3.2",
166-
"fs-extra": "^11.1.1",
167-
"husky": "^9.0.11",
166+
"fs-extra": "^11.2.0",
167+
"husky": "^9.1.4",
168168
"identity-obj-proxy": "^3.0.0",
169169
"jest": "^29.7.0",
170170
"jest-environment-jsdom": "^29.7.0",
171171
"jest-watch-typeahead": "^2.2.2",
172172
"lint-staged": "^15.2.2",
173-
"npm-run-all": "^4.1.5",
173+
"npm-run-all2": "^5.0.2",
174174
"path": "^0.12.7",
175175
"postcss-modules": "^6.0.0",
176176
"prettier": "^3.3.2",
177177
"prop-types": "^15.8.1",
178178
"resize-observer-polyfill": "^1.5.1",
179179
"rimraf": "^5.0.5",
180-
"sass": "^1.75.0",
180+
"sass": "^1.77.8",
181181
"sass-loader": "^13.3.2",
182-
"storybook": "^8.2.6",
182+
"storybook": "^8.2.7",
183183
"style-loader": "^3.3.3",
184-
"ts-jest": "^29.1.2",
184+
"ts-jest": "^29.2.4",
185185
"util": "^0.12.5",
186186
"uuid": "^9.0.1",
187-
"webpack": "^5.91.0",
187+
"webpack": "^5.93.0",
188188
"yargs": "^17.7.2"
189189
},
190190
"sideEffects": false

0 commit comments

Comments
 (0)