File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,13 +12,19 @@ jobs:
1212 - name : Use Node.js
1313 uses : actions/setup-node@v4
1414 with :
15- node-version : latest
16- - name : Install XVFB
17- run : sudo apt-get install -y xvfb
18- - name : Install Dependencies
19- run : npm install
20- - name : Install Playwright
21- run : npx playwright install
15+ node-version : 22
16+ cache : npm
17+ - run : npm ci --ignore-scripts
18+ - name : Cache Playwright browsers
19+ id : playwright-cache
20+ uses : actions/cache@v4
21+ with :
22+ path : ~/.cache/ms-playwright
23+ key : playwright-${{ runner.os }}-${{ hashFiles('package-lock.json') }}
24+ - run : npx playwright install --with-deps
25+ if : steps.playwright-cache.outputs.cache-hit != 'true'
26+ - run : npx playwright install-deps
27+ if : steps.playwright-cache.outputs.cache-hit == 'true'
2228 - name : Run Tests with XVFB
2329 run : xvfb-run --auto-servernum -- npm test
2430 env :
You can’t perform that action at this time.
0 commit comments