Skip to content

Playwright Tests

Playwright Tests #87

Workflow file for this run

name: Playwright Tests
on:
deployment_status:
jobs:
run-e2es:
if: github.event_name == 'deployment_status' && github.event.deployment_status.state == 'success'
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install dependencies
run: npm ci && npx playwright install --with-deps
- name: Run Playwright tests
env:
BASE_URL: ${{ github.event.deployment_status.environment_url }}
run: npx playwright test
- name: Upload Playwright Report
uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 7
- name: Slack Notification on Failure
if: failure()
run: |
curl -X POST -H 'Content-type: application/json' \
--data '{"text":"🚨 Playwright tests failed after deployment to '${{ github.event.deployment_status.environment }}'. Check the reports for details."}' \
${{ secrets.SLACK_WEBHOOK_URL }}