mirror of
https://github.com/tabler/tabler.git
synced 2025-12-21 17:34:25 +04:00
Enhance Playwright workflow with version retrieval and caching for improved performance
This commit is contained in:
15
.github/workflows/playwright.yml
vendored
15
.github/workflows/playwright.yml
vendored
@@ -39,11 +39,24 @@ jobs:
|
|||||||
- name: Install PNPM
|
- name: Install PNPM
|
||||||
uses: pnpm/action-setup@v4
|
uses: pnpm/action-setup@v4
|
||||||
|
|
||||||
|
- 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
|
||||||
|
|
||||||
|
- 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 pnpm dependencies
|
- name: Install pnpm dependencies
|
||||||
run: pnpm install
|
run: pnpm install
|
||||||
|
|
||||||
- name: Install Playwright Browsers
|
- name: Install Playwright Browsers
|
||||||
run: pnpm exec playwright install
|
run: pnpm exec playwright install --with-deps
|
||||||
|
if: steps.playwright-cache.outputs.cache-hit != 'true'
|
||||||
|
|
||||||
- name: Run Playwright tests
|
- name: Run Playwright tests
|
||||||
run: pnpm run playwright
|
run: pnpm run playwright
|
||||||
|
|||||||
Reference in New Issue
Block a user