chore(tests): move from testcafe to playwright #2
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: Playwright Tests | |
on: [pull_request] | |
env: | |
POSTHOG_PROJECT_KEY: "${{ secrets.POSTHOG_PROJECT_KEY }}" | |
POSTHOG_API_KEY: "${{ secrets.POSTHOG_API_KEY }}" | |
jobs: | |
integration: | |
name: Playwright - ${{ matrix.project }} | |
runs-on: ubuntu-22.04 | |
strategy: | |
matrix: | |
project: | |
- "chromium" | |
- "firefox" | |
- "webkit" | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ./.github/actions/setup | |
- run: pnpm build | |
working-directory: packages/browser | |
- name: Install Playwright Browsers | |
run: pnpm exec playwright install ${{ matrix.project }} --with-deps | |
working-directory: packages/browser | |
- name: Run Playwright tests | |
run: pnpm exec playwright test --project ${{ matrix.project }} | |
working-directory: packages/browser | |
timeout-minutes: 10 | |
env: | |
BRANCH_NAME: ${{ github.head_ref || github.ref_name }} | |
RUN_ID: ${{ github.run_id }} | |
BROWSER: ${{ matrix.project }} | |
- name: Check ingested events | |
run: pnpm check-api-results | |
working-directory: packages/browser | |
- uses: actions/upload-artifact@v4 | |
if: ${{ !cancelled() }} | |
with: | |
name: playwright-report | |
path: packages/browser/playwright-report/ | |
retention-days: 30 |