File tree Expand file tree Collapse file tree 2 files changed +30
-3
lines changed Expand file tree Collapse file tree 2 files changed +30
-3
lines changed Original file line number Diff line number Diff line change 12
12
- next
13
13
- v4
14
14
15
+ workflow_call :
16
+ inputs :
17
+ update-snapshots :
18
+ description : " Update snapshots?"
19
+ type : boolean
20
+
21
+ workflow_dispatch :
22
+ inputs :
23
+ update-snapshots :
24
+ description : " Update snapshots?"
25
+ type : boolean
26
+
15
27
permissions :
16
28
contents : read
17
29
97
109
node ./scripts/prepare-test-for-old-node.js
98
110
if : matrix.node-version == '18.x'
99
111
100
- - name : Install Playwright browsers and dependencies
101
- run : npx playwright install --with-deps
102
-
103
112
- name : Link webpack-dev-server
104
113
run : |
105
114
cp -R client tmp-client
@@ -116,6 +125,21 @@ jobs:
116
125
run : npm run test:coverage -- --ci --shard=${{ matrix.shard }}
117
126
if : matrix.node-version != '18.x'
118
127
128
+ - name : Install Playwright browsers and dependencies
129
+ run : npx playwright install --with-deps
130
+
131
+ - name : Set up cache
132
+ id : cache
133
+ uses : actions/cache@v4
134
+ with :
135
+ key : cache/${{github.repository}}/${{github.ref}}
136
+ restore-keys : cache/${{github.repository}}/refs/heads/master
137
+ path : .test/**
138
+
139
+ - name : Initialize snapshots
140
+ if : ${{steps.cache.outputs.cache-hit != 'true' || inputs.update-snapshots == 'true'}}
141
+ run : npx playwright test --update-snapshots
142
+
119
143
- name : Run E2E tests for webpack version ${{ matrix.webpack-version }}
120
144
run : npm run test:e2e -- --ignore-snapshots
121
145
Original file line number Diff line number Diff line change 3
3
module . exports = {
4
4
testIgnore : "**/*.ignore.*" ,
5
5
testDir : "./test/e2e" ,
6
+ outputDir : ".test/spec/output" ,
7
+ snapshotPathTemplate :
8
+ ".test/spec/snaps/{projectName}/{testFilePath}/{arg}{ext}" ,
6
9
fullyParallel : false ,
7
10
forbidOnly : process . env . CI !== "true" ,
8
11
retries : process . env . CI ? 2 : 0 ,
You can’t perform that action at this time.
0 commit comments