vercel.deployment.success #4926
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: E2E Tests | |
| on: | |
| repository_dispatch: | |
| types: | |
| - 'vercel.deployment.success' | |
| workflow_dispatch: | |
| inputs: | |
| base_url: | |
| description: 'Target URL (e.g. https://xyz.preview.app.daily.dev)' | |
| required: true | |
| type: string | |
| jobs: | |
| e2e-tests: | |
| if: >- | |
| (github.event_name == 'repository_dispatch' && github.event.client_payload.git.ref == 'main') || | |
| github.event_name == 'workflow_dispatch' | |
| timeout-minutes: 60 | |
| runs-on: ubuntu-latest | |
| container: | |
| image: mcr.microsoft.com/playwright:v1.58.2-noble | |
| options: --user 1001 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '24.14' | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 9.14.4 | |
| - name: Get pnpm store directory | |
| shell: bash | |
| run: | | |
| echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV | |
| - name: Setup pnpm cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: ${{ env.STORE_PATH }} | |
| key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-pnpm-store- | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Validate base URL | |
| if: github.event_name == 'workflow_dispatch' | |
| shell: bash | |
| run: | | |
| URL="${{ inputs.base_url }}" | |
| if [[ ! "$URL" =~ ^https://([a-zA-Z0-9-]+\.)*app\.daily\.dev(/.*)?$ ]]; then | |
| echo "::error::Invalid URL. Must be an app.daily.dev URL (e.g. https://app.daily.dev or https://xyz.preview.app.daily.dev)" | |
| exit 1 | |
| fi | |
| - name: Run Playwright tests | |
| env: | |
| USER_NAME: ${{ secrets.USER_NAME }} | |
| PASSWORD: ${{ secrets.PASSWORD }} | |
| BASE_URL: ${{ inputs.base_url || 'https://app.daily.dev' }} | |
| run: pnpm test:e2e | |
| - name: Upload Playwright Report | |
| uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: playwright-report | |
| path: packages/playwright/playwright-report/ | |
| retention-days: 30 | |
| - name: Report Status | |
| if: always() && github.run_attempt == 1 && github.event_name != 'workflow_dispatch' | |
| uses: ravsamhq/notify-slack-action@v1 | |
| with: | |
| status: ${{ job.status }} | |
| notify_when: 'failure' | |
| notification_title: '{workflow} has {status_message}' | |
| message_format: '{emoji} *{workflow}* {status_message} in <{repo_url}|{repo}>' | |
| footer: 'Linked to Repo <{repo_url}|{repo}>' | |
| env: | |
| SLACK_WEBHOOK_URL: ${{ secrets.E2E_MONITORING_SLACK }} |