Skip to content

chore(release): v0.0.4 #11

chore(release): v0.0.4

chore(release): v0.0.4 #11

Workflow file for this run

name: E2E Tests
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
jobs:
test:
name: Run E2E Tests
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Install Playwright browsers
run: npx playwright install --with-deps
- name: Build Docusaurus
run: npm run build
- name: Run Playwright tests
env:
PLAYWRIGHT_JUNIT_OUTPUT_FILE: test-results/junit.xml
run: npx playwright test --reporter=junit,html,list
- name: Upload test results (JUnit XML)
if: always()
uses: actions/upload-artifact@v4
with:
name: test-results-junit
path: test-results/junit.xml
retention-days: 30
- name: Upload test results (HTML Report)
if: always()
uses: actions/upload-artifact@v4
with:
name: test-results-html
path: test-results/html/
retention-days: 30
- name: Upload test screenshots (on failure)
if: failure()
uses: actions/upload-artifact@v4
with:
name: test-screenshots
path: test-results/
retention-days: 30
- name: Publish test results summary
if: always()
run: |
if [ -f test-results/junit.xml ]; then
echo "## Test Results Summary" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
# Extract test counts (basic parsing)
tests=$(grep -oP 'tests="\K[^"]+' test-results/junit.xml | head -1 || echo "N/A")
failures=$(grep -oP 'failures="\K[^"]+' test-results/junit.xml | head -1 || echo "N/A")
echo "- **Total Tests:** $tests" >> $GITHUB_STEP_SUMMARY
echo "- **Failures:** $failures" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "📊 [View detailed HTML report in artifacts](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }})" >> $GITHUB_STEP_SUMMARY
fi