Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cache playwright browsers. #2067

Merged
merged 3 commits into from
Oct 12, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
18 changes: 17 additions & 1 deletion .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,24 @@ jobs:
- name: Install dependencies
run: yarn

- name: Install Playwright browsers
- name: Get installed Playwright version
id: playwright-version
run: |
cd apps/examples
yarn info @playwright/test --json > playwright.json
echo "PLAYWRIGHT_VERSION=$(node -e "console.log(require('./playwright.json').children.Version)")" >> $GITHUB_ENV

- uses: actions/cache@v3
name: Check for Playwright browsers cache
id: playwright-cache
with:
path: |
~/.cache/ms-playwright
key: ${{ runner.os }}-playwright-${{ env.PLAYWRIGHT_VERSION }}

- name: Install Playwright Browsers
run: npx playwright install --with-deps chromium chrome
if: steps.playwright-cache.outputs.cache-hit != 'true'

- name: Run Playwright tests
run: 'yarn e2e'
Expand Down