Skip to content

Commit 7be69f4

Browse files
committed
remove redundant config and optimize browser installation
1 parent 9449464 commit 7be69f4

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

.github/workflows/ci.yml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535

3636
e2e-tests:
3737
runs-on: ubuntu-latest
38-
timeout-minutes: 30
38+
timeout-minutes: 20
3939

4040
strategy:
4141
matrix:
@@ -72,13 +72,16 @@ jobs:
7272
id: playwright-cache
7373
with:
7474
path: ~/.cache/ms-playwright
75-
key: ${{ runner.os }}-playwright-${{ hashFiles('react-example/package.json', 'react-example/playwright.config.ts') }}
75+
key: ${{ runner.os }}-playwright-${{ matrix.browser }}-v${{ hashFiles('react-example/package.json', 'react-example/playwright.config.ts') }}
7676
restore-keys: |
77-
${{ runner.os }}-playwright-${{ hashFiles('react-example/package.json') }}-
77+
${{ runner.os }}-playwright-${{ matrix.browser }}-
7878
${{ runner.os }}-playwright-
79-
- name: Install Playwright browsers
79+
- name: Install Playwright browsers (browser-specific)
8080
working-directory: ./react-example
81-
run: yarn playwright:install --with-deps
81+
run: |
82+
echo "📥 Installing only ${{ matrix.browser }} browser..."
83+
yarn playwright install ${{ matrix.browser }} --with-deps
84+
echo "✅ Browser installation completed"
8285
- name: Create environment configuration
8386
working-directory: ./react-example
8487
run: |
@@ -116,10 +119,9 @@ jobs:
116119
- name: Run Playwright tests
117120
working-directory: ./react-example
118121
run: |
119-
yarn playwright test --project=${{ matrix.browser }} --reporter=github
122+
yarn playwright test --project=${{ matrix.browser }}
120123
env:
121124
CI: true
122-
PLAYWRIGHT_TIMEOUT: 30000
123125
- name: Upload Playwright report
124126
uses: actions/upload-artifact@v4
125127
if: always()

0 commit comments

Comments
 (0)