68 lines
1.8 KiB
YAML
Executable file
68 lines
1.8 KiB
YAML
Executable file
# Example GitHub Actions workflow for Playwright E2E tests
|
|
# Copy this to .github/workflows/e2e.yml to enable CI testing
|
|
|
|
name: Playwright E2E Tests
|
|
|
|
on:
|
|
push:
|
|
branches: [main, develop]
|
|
pull_request:
|
|
branches: [main, develop]
|
|
|
|
jobs:
|
|
test:
|
|
timeout-minutes: 60
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 18
|
|
|
|
- name: Install pnpm
|
|
uses: pnpm/action-setup@v2
|
|
with:
|
|
version: 8
|
|
|
|
- name: Get pnpm store directory
|
|
shell: bash
|
|
run: |
|
|
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
|
|
|
|
- uses: actions/cache@v4
|
|
name: Setup pnpm cache
|
|
with:
|
|
path: ${{ env.STORE_PATH }}
|
|
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-pnpm-store-
|
|
|
|
- name: Install dependencies
|
|
working-directory: codebase/features/conversation-assistant/frontend
|
|
run: pnpm install
|
|
|
|
- name: Install Playwright Browsers
|
|
working-directory: codebase/features/conversation-assistant/frontend
|
|
run: pnpm exec playwright install --with-deps
|
|
|
|
- name: Run Playwright tests
|
|
working-directory: codebase/features/conversation-assistant/frontend
|
|
run: pnpm test:e2e
|
|
env:
|
|
CI: true
|
|
|
|
- uses: actions/upload-artifact@v4
|
|
if: always()
|
|
with:
|
|
name: playwright-report
|
|
path: codebase/features/conversation-assistant/frontend/playwright-report/
|
|
retention-days: 30
|
|
|
|
- uses: actions/upload-artifact@v4
|
|
if: always()
|
|
with:
|
|
name: test-results
|
|
path: codebase/features/conversation-assistant/frontend/test-results/
|
|
retention-days: 30
|