Skip to content

Commit

Permalink
Merge pull request #36 from hildjj/cache-pw
Browse files Browse the repository at this point in the history
Add caching to playwright
  • Loading branch information
hildjj authored Jun 5, 2024
2 parents 884c854 + 185659a commit 9441bbe
Showing 1 changed file with 20 additions and 4 deletions.
24 changes: 20 additions & 4 deletions .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,28 @@ jobs:
run: pnpm i -r
- name: build
run: npm run build && npm run docs
- name: Install Playwright Browsers
run: cd web && npx playwright install --with-deps
- name: Get installed Playwright version
id: playwright-version
run: echo "PLAYWRIGHT_VERSION=$(pnpm ls @playwright/test --parseable | tail -1)" >> $GITHUB_ENV
working-directory: web
- 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'
working-directory: web
- run: npx playwright install-deps
if: steps.playwright-cache.outputs.cache-hit == 'true'
working-directory: web
- name: Run Playwright tests
run: npm run test:web
run: npm run test
working-directory: web
- uses: actions/upload-artifact@v4
if: always()
if: failure()
with:
name: playwright-report
path: web/playwright-report/
Expand Down

0 comments on commit 9441bbe

Please sign in to comment.