Skip to content

.github/workflows/playwright.yml #18

.github/workflows/playwright.yml

.github/workflows/playwright.yml #18

Workflow file for this run

name: Playwright Tests
on:
deployment_status: # Trigger on deployment status changes
jobs:
run-e2es: # Job name for end-to-end tests
if: github.event_name == 'deployment_status' && github.event.deployment_status.state == 'success' # Run only if deployment is successful
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- name: Install dependencies
run: npm ci && npx playwright install --with-deps # Install dependencies and Playwright browsers
- name: Set BASE_URL
run: echo "BASE_URL=${{ github.event.deployment_status.environment_url }}" >> $GITHUB_ENV # Set BASE_URL from deployment status
- name: Run tests
run: npx playwright test # Execute Playwright tests
env:
VERCEL_AUTOMATION_BYPASS_SECRET: ${{ secrets.VERCEL_AUTOMATION_BYPASS_SECRET }}