Skip to content

Piyush/sdk overhaul

Piyush/sdk overhaul #2

Workflow file for this run

# This is a test workflow for testing the tests
name: E2E Tests
on:
push:
branches: ['*']
pull_request:
branches: ['*']
jobs:
playwright-run:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
project: ['Desktop Chrome', 'Desktop Firefox', 'Desktop Safari']
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Build SDK
run: npm run build
- name: Install test app dependencies
working-directory: ./test-app
run: npm ci
- name: Install Playwright browsers
working-directory: ./test-app
run: npx playwright install --with-deps
- name: Run Playwright tests
working-directory: ./test-app
run: npx playwright test --project="${{ matrix.project }}"
- name: Upload test results on failure
if: failure()
uses: actions/upload-artifact@v4
with:
name: playwright-results-${{ matrix.project }}
path: test-app/test-results/
if-no-files-found: ignore
- name: Upload Playwright report
if: always()
uses: actions/upload-artifact@v4
with:
name: playwright-report-${{ matrix.project }}
path: test-app/playwright-report/
retention-days: 30
if-no-files-found: ignore
- name: Generate test report
if: always()
run: |
echo "## Test Results - ${{ matrix.project }}" >> $GITHUB_STEP_SUMMARY
echo "Project: ${{ matrix.project }}" >> $GITHUB_STEP_SUMMARY