Skip to content

Commit

Permalink
improvement(#52): add cache to playwright e2e tests
Browse files Browse the repository at this point in the history
  • Loading branch information
talDoFlemis committed Apr 24, 2024
1 parent 8cbcc6a commit 77bf4e9
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,30 @@ jobs:
- name: Run backend
run: task backend:run-web -- &


- name: Get installed Playwright version
id: playwright-version
run: echo "PLAYWRIGHT_VERSION=$(node -e "console.log(require('./package-lock.json').dependencies['@playwright/test'].version)")" >> $GITHUB_ENV
working-directory: frontend

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

- name: Install dependencies
run: npm ci
working-directory: frontend

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

- run: npx playwright install-deps
if: steps.playwright-cache.outputs.cache-hit != 'true'
working-directory: frontend

- name: Run Playwright tests
Expand Down

0 comments on commit 77bf4e9

Please sign in to comment.