Skip to content

Commit 2a03f7f

Browse files
authored
Merge pull request #293 from ujiro99/copilot/optimize-actions-efficiency
chore: GitHub Actions 効率化(Playwright キャッシュ追加・重複テスト削除)
2 parents e14b030 + 7274f6c commit 2a03f7f

1 file changed

Lines changed: 14 additions & 3 deletions

File tree

.github/workflows/test.yml

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,6 @@ jobs:
2929
- name: Run lint
3030
run: yarn lint
3131

32-
- name: Run tests
33-
run: yarn test --run
34-
3532
- name: Run tests with coverage
3633
run: yarn test:coverage --run
3734

@@ -60,8 +57,22 @@ jobs:
6057
- name: Build extension
6158
run: yarn build:e2e
6259

60+
- name: Cache Playwright browsers
61+
id: playwright-cache
62+
uses: actions/cache@v4
63+
with:
64+
path: ~/.cache/ms-playwright
65+
key: playwright-chromium-${{ hashFiles('**/package.json', 'yarn.lock') }}-v1
66+
restore-keys: |
67+
playwright-chromium-
68+
6369
- name: Install Playwright browsers
70+
if: steps.playwright-cache.outputs.cache-hit != 'true'
6471
run: npx playwright install chromium --with-deps
6572

73+
- name: Install Playwright system dependencies
74+
if: steps.playwright-cache.outputs.cache-hit == 'true'
75+
run: npx playwright install-deps chromium
76+
6677
- name: Run E2E tests
6778
run: yarn test:e2e

0 commit comments

Comments
 (0)