Skip to content

E2E Tests - Nightly #121

E2E Tests - Nightly

E2E Tests - Nightly #121

Workflow file for this run

name: E2E Tests - Nightly
on:
schedule:
# Run at 2 AM UTC every day
- cron: '0 2 * * *'
workflow_dispatch:
inputs:
test_suite:
description: 'Test suite to run'
required: false
default: 'all'
type: choice
options:
- all
- smoke
- journey
jobs:
e2e-full-matrix:
runs-on: ubuntu-latest
strategy:
matrix:
browser: [chromium, firefox, webkit]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Install dependencies
run: bun install
- name: Build shared package
run: bun run build:shared
- name: Build dashboard service
run: bun run build:dashboard
- name: Install Playwright browsers
run: bunx playwright install ${{ matrix.browser }}
- name: Determine test suite
id: test_suite
run: |
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
SUITE="${{ github.event.inputs.test_suite }}"
else
SUITE="all"
fi
echo "suite=$SUITE" >> $GITHUB_OUTPUT
- name: Run E2E tests - All
if: steps.test_suite.outputs.suite == 'all'
run: bunx playwright test --project=${{ matrix.browser }}
env:
DASHBOARD_API_KEY: test_dashboard_key_ci
CI: true
TEST_RETRIES: 2
- name: Run E2E tests - Smoke only
if: steps.test_suite.outputs.suite == 'smoke'
run: bunx playwright test --grep @smoke --project=${{ matrix.browser }}
env:
DASHBOARD_API_KEY: test_dashboard_key_ci
CI: true
TEST_RETRIES: 2
- name: Run E2E tests - Journey only
if: steps.test_suite.outputs.suite == 'journey'
run: bunx playwright test --grep @journey --project=${{ matrix.browser }}
env:
DASHBOARD_API_KEY: test_dashboard_key_ci
CI: true
TEST_RETRIES: 2
- name: Upload test results
if: always()
uses: actions/upload-artifact@v4
with:
name: playwright-report-${{ matrix.browser }}
path: |
playwright-report/
test-results/
retention-days: 7
- name: Upload trace files
if: failure()
uses: actions/upload-artifact@v4
with:
name: playwright-traces-${{ matrix.browser }}
path: test-results/
retention-days: 3
notify-on-failure:
needs: e2e-full-matrix
if: failure()
runs-on: ubuntu-latest
steps:
- name: Notify team
run: |
echo "E2E tests failed in nightly run"
# Add Slack/email notification here if configured