ci: Added webcomponent directives e2e tests

pull/839/head
Carlos Santos 2024-07-30 15:51:34 +02:00 committed by Unknown
parent 9fd1c5b746
commit 17a6edbe91
2 changed files with 61 additions and 53 deletions

View File

@ -155,56 +155,56 @@ jobs:
- name: Run nested components E2E directives tests - name: Run nested components E2E directives tests
run: npm run e2e:nested-directives-ci --prefix openvidu-components-angular run: npm run e2e:nested-directives-ci --prefix openvidu-components-angular
# webcomponent_e2e: webcomponent_e2e_directives:
# needs: test_setup needs: test_setup
# name: Webcomponent E2E CE tests name: Webcomponent directives
# runs-on: ubuntu-latest runs-on: ubuntu-latest
# steps: steps:
# - name: Checkout Repository - name: Checkout Repository
# uses: actions/checkout@v4 uses: actions/checkout@v4
# with: with:
# ref: ${{ inputs.commit_sha || github.sha }} ref: ${{ inputs.commit_sha || github.sha }}
# - name: Setup Node.js - name: Setup Node.js
# uses: actions/setup-node@v4 uses: actions/setup-node@v4
# with: with:
# node-version: '20' node-version: '20'
# - name: Run Browserless Chrome # - name: Run Browserless Chrome
# run: docker run -d -p 3000:3000 --network host browserless/chrome:1.57-chrome-stable # run: docker run -d -p 3000:3000 --network host browserless/chrome:1.57-chrome-stable
# - name: Run Chrome - name: Run Chrome
# run: docker run --network=host -d -p 4444:4444 selenium/standalone-chrome:127.0 run: docker run --network=host -d -p 4444:4444 selenium/standalone-chrome:127.0
# - name: Run openvidu-local-deployment - name: Run openvidu-local-deployment
# run: | run: |
# git clone --depth 1 https://github.com/OpenVidu/openvidu-local-deployment git clone --depth 1 https://github.com/OpenVidu/openvidu-local-deployment
# cd openvidu-local-deployment/community cd openvidu-local-deployment/community
# ./configure_lan_private_ip_linux.sh ./configure_lan_private_ip_linux.sh
# docker compose up -d docker compose up -d
# - name: Run openvidu-call-backend - name: Run openvidu-call-backend
# run: | run: |
# git clone --depth 1 https://github.com/OpenVidu/openvidu-call git clone --depth 1 https://github.com/OpenVidu/openvidu-call
# cd openvidu-call/openvidu-call-back cd openvidu-call/openvidu-call-back
# npm install npm install
# npm run dev:start & npm run dev:start &
# - name: Install dependencies - name: Install dependencies
# run: | run: |
# cd openvidu-components-angular cd openvidu-components-angular
# npm install npm install
# - name: Build openvidu-angular - name: Build openvidu-angular
# run: npm run lib:build --prefix openvidu-components-angular run: npm run lib:build --prefix openvidu-components-angular
# - name: Build openvidu-webcomponent - name: Build openvidu-webcomponent
# run: npm run webcomponent:build --prefix openvidu-components-angular run: npm run webcomponent:build --prefix openvidu-components-angular
# - name: Serve Webcomponent Testapp - name: Serve Webcomponent Testapp
# run: npm run webcomponent:serve-testapp --prefix openvidu-components-angular & run: npm run webcomponent:serve-testapp --prefix openvidu-components-angular &
# - name: Wait for openvidu-local-deployment - name: Wait for openvidu-local-deployment
# run: | run: |
# until curl -s -f -o /dev/null http://localhost:7880; do until curl -s -f -o /dev/null http://localhost:7880; do
# echo "Waiting for openvidu-local-deployment to be ready..." echo "Waiting for openvidu-local-deployment to be ready..."
# sleep 5 sleep 5
# done done
# - name: Wait for openvidu-components-angular Testapp - name: Wait for openvidu-components-angular Testapp
# run: | run: |
# until curl -s -f -o /dev/null http://localhost:4200; do until curl -s -f -o /dev/null http://localhost:8080; do
# echo "Waiting for openvidu-components-angular Testapp to be ready..." echo "Waiting for openvidu-components-angular Testapp to be ready..."
# sleep 5 sleep 5
# done done
# - name: Run Webcomponent E2E - name: Run Webcomponent E2E
# run: npm run webcomponent:e2e-ci --prefix openvidu-components-angular run: LAUNCH_MODE=CI npm run e2e:webcomponent-directives --prefix openvidu-components-angular

View File

@ -95,7 +95,16 @@
"e2e:nested-all-ci": "cross-env LAUNCH_MODE=CI npm run e2e:nested-all", "e2e:nested-all-ci": "cross-env LAUNCH_MODE=CI npm run e2e:nested-all",
"e2e:nested-events-ci": "cross-env LAUNCH_MODE=CI npm run e2e:nested-events", "e2e:nested-events-ci": "cross-env LAUNCH_MODE=CI npm run e2e:nested-events",
"e2e:nested-directives-ci": "cross-env LAUNCH_MODE=CI npm run e2e:nested-directives", "e2e:nested-directives-ci": "cross-env LAUNCH_MODE=CI npm run e2e:nested-directives",
"e2e:webcomponent-all": "tsc --project ./e2e && npx mocha --recursive --timeout 30000 ./e2e/dist/webcomponent-e2e/**/*.test.js",
"e2e:webcomponent-directives": "tsc --project ./e2e && npx mocha --recursive --timeout 30000 ./e2e/dist/webcomponent-e2e/api-directives.test.js",
"e2e:webcomponent-captions": "tsc --project ./e2e && npx mocha --recursive --timeout 30000 ./e2e/dist/webcomponent-e2e/captions.test.js",
"e2e:webcomponent-chat": "tsc --project ./e2e && npx mocha --recursive --timeout 30000 ./e2e/dist/webcomponent-e2e/chat.test.js",
"e2e:webcomponent-events": "tsc --project ./e2e && npx mocha --recursive --timeout 30000 ./e2e/dist/webcomponent-e2e/events.test.js",
"e2e:webcomponent-media-devices": "tsc --project ./e2e && npx mocha --recursive --timeout 30000 ./e2e/dist/webcomponent-e2e/media-devices.test.js",
"e2e:webcomponent-panels": "tsc --project ./e2e && npx mocha --recursive --timeout 30000 ./e2e/dist/webcomponent-e2e/panels.test.js",
"e2e:webcomponent-screensharing": "tsc --project ./e2e && npx mocha --recursive --timeout 30000 ./e2e/dist/webcomponent-e2e/screensharing.test.js",
"e2e:webcomponent-stream": "tsc --project ./e2e && npx mocha --recursive --timeout 30000 ./e2e/dist/webcomponent-e2e/stream.test.js",
"e2e:webcomponent-toolbar": "tsc --project ./e2e && npx mocha --recursive --timeout 30000 ./e2e/dist/webcomponent-e2e/toolbar.test.js",
"lint": "ng lint", "lint": "ng lint",
"start": "ng serve --configuration development --open", "start": "ng serve --configuration development --open",
@ -103,7 +112,6 @@
"start:ssl": "ng serve --ssl --configuration development --host 0.0.0.0 --port 5080", "start:ssl": "ng serve --ssl --configuration development --host 0.0.0.0 --port 5080",
"webcomponent:testing-build": "./node_modules/@angular/cli/bin/ng.js build openvidu-webcomponent --configuration testing && node ./openvidu-webcomponent-build.js", "webcomponent:testing-build": "./node_modules/@angular/cli/bin/ng.js build openvidu-webcomponent --configuration testing && node ./openvidu-webcomponent-build.js",
"webcomponent:build": "./node_modules/@angular/cli/bin/ng.js build openvidu-webcomponent --configuration production && node ./openvidu-webcomponent-build.js", "webcomponent:build": "./node_modules/@angular/cli/bin/ng.js build openvidu-webcomponent --configuration production && node ./openvidu-webcomponent-build.js",
"webcomponent:e2e": "tsc --project ./e2e && npx mocha --recursive --timeout 30000 ./e2e/dist/webcomponent-e2e/**/*.test.js",
"webcomponent:e2e-ci": "cross-env LAUNCH_MODE=CI npm run webcomponent:e2e", "webcomponent:e2e-ci": "cross-env LAUNCH_MODE=CI npm run webcomponent:e2e",
"webcomponent:serve-testapp": "npx http-server ./e2e/webcomponent-app/", "webcomponent:serve-testapp": "npx http-server ./e2e/webcomponent-app/",
"simulate:multiparty": "livekit-cli load-test --url ws://localhost:7880 --api-key devkey --api-secret secret --room daily-call --publishers 8 --audio-publishers 8 --identity-prefix Participant --identity publisher" "simulate:multiparty": "livekit-cli load-test --url ws://localhost:7880 --api-key devkey --api-secret secret --room daily-call --publishers 8 --audio-publishers 8 --identity-prefix Participant --identity publisher"