Skip to content

Commit

Permalink
chore(ci): update caching strategy for node modules and Playwright br…
Browse files Browse the repository at this point in the history
…owsers
  • Loading branch information
MoinJulian committed Nov 21, 2024
1 parent 1dd835c commit ffbc27d
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,21 +26,19 @@ jobs:
with:
node-version: lts/*

- name: Create cache directory if not exists
run: mkdir -p ~/.npm

- name: Cache node modules
uses: actions/cache@v3
- name: Cache node modules and Playwright browsers
id: cache-node-modules-and-playwright-browsers
uses: actions/cache@v4
with:
path: ~/.npm
path: dependencies
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-

- name: Install dependencies
if: steps.cache-node-modules-and-playwright-browsers.outputs.cache-hit != 'true'
run: npm ci

- name: Install Playwright browsers
if: steps.cache-node-modules-and-playwright-browsers.outputs.cache-hit != 'true'
run: npx playwright install --with-deps chromium

- name: Test Playwright API
Expand Down

0 comments on commit ffbc27d

Please sign in to comment.