72 lines
2.3 KiB
YAML
72 lines
2.3 KiB
YAML
name: WebComponent E2E Tests
|
|
on:
|
|
push:
|
|
pull_request:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
e2e-tests:
|
|
name: WebComponent E2E Tests
|
|
runs-on: ov-actions-runner
|
|
steps:
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '22.13'
|
|
- name: Setup OpenVidu Local Deployment
|
|
uses: OpenVidu/actions/start-openvidu-local-deployment@main
|
|
with:
|
|
ref-openvidu-local-deployment: development
|
|
pre_startup_commands: |
|
|
cat <<'BASH' > pre_startup_commands.sh
|
|
#!/bin/bash
|
|
echo "Commenting out openvidu-meet container in docker-compose.yaml"
|
|
if [ -f docker-compose.yaml ]; then
|
|
yq e 'del(.services.openvidu-meet)' -i docker-compose.yaml
|
|
fi
|
|
BASH
|
|
chmod +x pre_startup_commands.sh && ./pre_startup_commands.sh
|
|
- name: Setup OpenVidu Meet
|
|
uses: OpenVidu/actions/start-openvidu-meet@main
|
|
env:
|
|
MEET_INITIAL_WEBHOOK_ENABLED: true
|
|
MEET_INITIAL_WEBHOOK_URL: 'http://localhost:5080/webhook'
|
|
- name: Start OpenVidu Meet Testapp
|
|
uses: OpenVidu/actions/start-openvidu-meet-testapp@main
|
|
with:
|
|
skip_checkout: 'true'
|
|
- name: Run tests
|
|
run: |
|
|
cd frontend/webcomponent
|
|
# Install Playwright browsers
|
|
mkdir -p /tmp/ms-playwright
|
|
npx playwright install --with-deps chromium
|
|
npm run test:e2e
|
|
env:
|
|
RUN_MODE: CI
|
|
PLAYWRIGHT_BROWSERS_PATH: /tmp/ms-playwright
|
|
- name: Upload test results
|
|
if: always()
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: room-test-results
|
|
path: frontend/webcomponent/test-results/
|
|
retention-days: 2
|
|
- name: Upload TestApp logs on failure
|
|
if: failure()
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: room-test-testapp-logs
|
|
path: testapp/testapp.log
|
|
retention-days: 2
|
|
- name: Upload OpenVidu Meet logs on failure
|
|
if: failure()
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: room-test-openvidu-meet-logs
|
|
path: backend/meet_backend.log
|
|
retention-days: 2
|
|
- name: Clean up
|
|
if: always()
|
|
uses: OpenVidu/actions/cleanup@main
|