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 1212 - next
1313 - v4
1414
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+
1527permissions :
1628 contents : read
1729
97109 node ./scripts/prepare-test-for-old-node.js
98110 if : matrix.node-version == '18.x'
99111
100- - name : Install Playwright browsers and dependencies
101- run : npx playwright install --with-deps
102-
103112 - name : Link webpack-dev-server
104113 run : |
105114 cp -R client tmp-client
@@ -116,6 +125,21 @@ jobs:
116125 run : npm run test:coverage -- --ci --shard=${{ matrix.shard }}
117126 if : matrix.node-version != '18.x'
118127
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+
119143 - name : Run E2E tests for webpack version ${{ matrix.webpack-version }}
120144 run : npm run test:e2e -- --ignore-snapshots
121145
Original file line number Diff line number Diff line change 33module . exports = {
44 testIgnore : "**/*.ignore.*" ,
55 testDir : "./test/e2e" ,
6+ outputDir : ".test/spec/output" ,
7+ snapshotPathTemplate :
8+ ".test/spec/snaps/{projectName}/{testFilePath}/{arg}{ext}" ,
69 fullyParallel : false ,
710 forbidOnly : process . env . CI !== "true" ,
811 retries : process . env . CI ? 2 : 0 ,
You can’t perform that action at this time.
0 commit comments