woocommerce/plugins/woocommerce-blocks/.github/workflows/playwright.yml

32 lines
785 B
YAML

name: Playwright Tests
on:
push:
branches: [trunk]
pull_request:
jobs:
PlaywrightE2ETests:
name: Playwright E2E tests
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
cache: 'npm' # Cache npm dependencies
- name: Install dependencies
run: npm ci
- name: Load wp-env
run: npm run env:start
- name: Install Playwright Browsers
run: npx playwright install --with-deps
- name: Run Playwright tests
run: npx playwright test --config=tests/e2e-pw/playwright.config.ts
- uses: actions/upload-artifact@v3
with:
name: playwright-report
path: playwright-report/
retention-days: 30