Skip to content

Commit efc7401

Browse files
Update test.yml
1 parent 3b63bc8 commit efc7401

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

.github/workflows/test.yml

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,32 @@ jobs:
3535
package-lock.json
3636
angular-report-designer/package-lock.json
3737
38+
- name: Cache Playwright browsers
39+
uses: actions/cache@v4
40+
id: playwright-cache
41+
with:
42+
path: |
43+
~/.cache/ms-playwright
44+
~/AppData/Local/ms-playwright
45+
key: ${{ runner.os }}-playwright-${{ hashFiles('package-lock.json') }}
46+
restore-keys: |
47+
${{ runner.os }}-playwright-
48+
3849
- name: Setup Chrome
3950
uses: browser-actions/setup-chrome@v1
4051
with:
4152
chrome-version: stable
42-
53+
54+
- name: Install Playwright browsers
55+
run: |
56+
if (Test-Path "$env:USERPROFILE\AppData\Local\ms-playwright\chromium*") {
57+
Write-Host "Playwright browsers already installed"
58+
} else {
59+
Write-Host "Installing Playwright browsers..."
60+
npx playwright install --with-deps
61+
}
62+
shell: pwsh
63+
4364
- name: Run Tests
4465
shell: pwsh
4566
run: |
@@ -55,3 +76,4 @@ jobs:
5576
Write-Host "❌ Test execution failed: $($_.Exception.Message)" -ForegroundColor Red
5677
exit 1
5778
}
79+

0 commit comments

Comments
 (0)