openvidu/.github/workflows/wc-e2e-test.yaml

79 lines
2.3 KiB
YAML

name: WebComponent E2E Tests
on: [push, pull_request]
jobs:
unit-test:
name: WebComponent E2E Tests
runs-on: ov-actions-runner
steps:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install wait-on
run: npm install -g wait-on
- name: Checkout OpenVidu Meet
uses: actions/checkout@v4
- name: Checkout OpenVidu Local Deployment
uses: actions/checkout@v4
with:
repository: OpenVidu/openvidu-local-deployment
ref: development
path: openvidu-local-deployment
- name: Configure Local Deployment
shell: bash
run: |
cd openvidu-local-deployment/community
./configure_lan_private_ip_linux.sh
docker compose up -d
- name: Wait for OpenVidu Local Deployment to Start
run: wait-on --timeout 60000 http://localhost:7880
- name: Checkout OpenVidu Meet
uses: actions/checkout@v4
- name: Setup OpenVidu Meet
shell: bash
run: |
./prepare.sh
cd backend
npm install
npm run start:prod > ../backend.log 2>&1 &
env:
MEET_WEBHOOK_ENABLED: true
- name: Wait for OpenVidu Meet to Start
run: wait-on --timeout 30000 http://localhost:6080/meet/health
- name: Start testapp
shell: bash
run: |
cd testapp
npm install
npm run build
npm run start > ../testapp.log 2>&1 &
- name: Wait for testapp to Start
run: wait-on --timeout 30000 http://localhost:5080
- name: Run tests
run: |
ls -al backend/public
ls -al backend/public/webcomponent
cd frontend/webcomponent
# Install Playwright browsers
mkdir -p /tmp/ms-playwright
PLAYWRIGHT_BROWSERS_PATH=/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 logs
if: always()
uses: actions/upload-artifact@v4
with:
name: service-logs
path: |
backend.log
testapp.log
retention-days: 7
- name: Clean up
if: always()
uses: ./.github/actions/cleanup