Skip to content

Commit

Permalink
chore: cache playwright browser on CI (#20)
Browse files Browse the repository at this point in the history
  • Loading branch information
abereghici authored Feb 6, 2023
1 parent dedc501 commit de831e2
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,20 @@ jobs:
run: yarn validate

- name: 📥 Install Playwright Browsers
run: npx playwright install --with-deps
id: playwright-version
run: |
echo "PLAYWRIGHT_VERSION=$(node -e "console.log(JSON.parse(require('child_process').execSync('yarn info @playwright/test version --json')).data.trim())")" >> $GITHUB_ENV
- name: 🏎️ Cache playwright binaries
uses: actions/cache@v3
id: playwright-cache
with:
path: |
~/.cache/ms-playwright
key: ${{ runner.os }}-playwright-${{ env.PLAYWRIGHT_VERSION }}
- run: npx playwright install --with-deps
if: steps.playwright-cache.outputs.cache-hit != 'true'
- run: npx playwright install-deps
if: steps.playwright-cache.outputs.cache-hit == 'true'

- name: 🎭 Playwright tests
run: npx playwright test
Expand Down

0 comments on commit de831e2

Please sign in to comment.