jbilcke-hf HF staff commited on
Commit
b99b820
1 Parent(s): 3a25c0b

fix for GitHub Actions

Browse files
Files changed (1) hide show
  1. .github/workflows/tests.yml +10 -7
.github/workflows/tests.yml CHANGED
@@ -25,9 +25,8 @@ jobs:
25
  uses: actions/cache@v4
26
  id: playwright-cache
27
  with:
28
- path: |
29
- ~/.cache/ms-playwright
30
- key: ${{ runner.os }}-playwright-${{ env.PLAYWRIGHT_VERSION }}
31
  - name: Cache NextJS dependencies
32
  uses: actions/cache@v4
33
  with:
@@ -42,12 +41,16 @@ jobs:
42
  ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-
43
  - name: Install dependencies
44
  run: npm ci
 
 
 
45
  - name: Install Playwright Browsers
46
- run: npx playwright install --with-deps
47
  if: steps.playwright-cache.outputs.cache-hit != 'true'
48
- #- name: Install Playwright Browsers
49
- # run: npx playwright install-deps
50
- # if: steps.playwright-cache.outputs.cache-hit != 'true'
 
51
  - name: Run build
52
  run: npm run build:ci
53
  - name: Run unit tests
 
25
  uses: actions/cache@v4
26
  id: playwright-cache
27
  with:
28
+ path: /home/runner/.cache/ms-playwright
29
+ key: ${{ runner.os }}-playwright-${{ env.PLAYWRIGHT_VERSION }}-${{ inputs.browser }}
 
30
  - name: Cache NextJS dependencies
31
  uses: actions/cache@v4
32
  with:
 
41
  ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-
42
  - name: Install dependencies
43
  run: npm ci
44
+
45
+ - name: Install Playwright
46
+ run: npm install @playwright/test@${{ env.PLAYWRIGHT_VERSION }}
47
  - name: Install Playwright Browsers
48
+ run: npx playwright install --with-deps ${{ inputs.browser }}
49
  if: steps.playwright-cache.outputs.cache-hit != 'true'
50
+ - name: Install system dependencies for WebKit
51
+ # Some WebKit dependencies seem to lay outside the cache and will need to be installed separately
52
+ if: ${{ inputs.browser == 'webkit' && steps.playwright-cache.outputs.cache-hit == 'true' }}
53
+ run: npx playwright install-deps webkit
54
  - name: Run build
55
  run: npm run build:ci
56
  - name: Run unit tests