Skip to content

Commit

Permalink
ci: Added webcomponent directives e2e tests
Browse files Browse the repository at this point in the history
  • Loading branch information
CSantosM committed Jul 30, 2024
1 parent 9fd1c5b commit 17a6edb
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 53 deletions.
102 changes: 51 additions & 51 deletions .github/workflows/openvidu-components-angular-E2E.yml
Original file line number Diff line number Diff line change
Expand Up @@ -155,56 +155,56 @@ jobs:
- name: Run nested components E2E directives tests
run: npm run e2e:nested-directives-ci --prefix openvidu-components-angular

# webcomponent_e2e:
# needs: test_setup
# name: Webcomponent E2E CE tests
# runs-on: ubuntu-latest
# steps:
# - name: Checkout Repository
# uses: actions/checkout@v4
# with:
# ref: ${{ inputs.commit_sha || github.sha }}
# - name: Setup Node.js
# uses: actions/setup-node@v4
# with:
# node-version: '20'
webcomponent_e2e_directives:
needs: test_setup
name: Webcomponent directives
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
ref: ${{ inputs.commit_sha || github.sha }}
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
# - name: Run Browserless Chrome
# run: docker run -d -p 3000:3000 --network host browserless/chrome:1.57-chrome-stable
# - name: Run Chrome
# run: docker run --network=host -d -p 4444:4444 selenium/standalone-chrome:127.0
# - name: Run openvidu-local-deployment
# run: |
# git clone --depth 1 https://github.com/OpenVidu/openvidu-local-deployment
# cd openvidu-local-deployment/community
# ./configure_lan_private_ip_linux.sh
# docker compose up -d
# - name: Run openvidu-call-backend
# run: |
# git clone --depth 1 https://github.com/OpenVidu/openvidu-call
# cd openvidu-call/openvidu-call-back
# npm install
# npm run dev:start &
# - name: Install dependencies
# run: |
# cd openvidu-components-angular
# npm install
# - name: Build openvidu-angular
# run: npm run lib:build --prefix openvidu-components-angular
# - name: Build openvidu-webcomponent
# run: npm run webcomponent:build --prefix openvidu-components-angular
# - name: Serve Webcomponent Testapp
# run: npm run webcomponent:serve-testapp --prefix openvidu-components-angular &
# - name: Wait for openvidu-local-deployment
# run: |
# until curl -s -f -o /dev/null http://localhost:7880; do
# echo "Waiting for openvidu-local-deployment to be ready..."
# sleep 5
# done
# - name: Wait for openvidu-components-angular Testapp
# run: |
# until curl -s -f -o /dev/null http://localhost:4200; do
# echo "Waiting for openvidu-components-angular Testapp to be ready..."
# sleep 5
# done
# - name: Run Webcomponent E2E
# run: npm run webcomponent:e2e-ci --prefix openvidu-components-angular
- name: Run Chrome
run: docker run --network=host -d -p 4444:4444 selenium/standalone-chrome:127.0
- name: Run openvidu-local-deployment
run: |
git clone --depth 1 https://github.com/OpenVidu/openvidu-local-deployment
cd openvidu-local-deployment/community
./configure_lan_private_ip_linux.sh
docker compose up -d
- name: Run openvidu-call-backend
run: |
git clone --depth 1 https://github.com/OpenVidu/openvidu-call
cd openvidu-call/openvidu-call-back
npm install
npm run dev:start &
- name: Install dependencies
run: |
cd openvidu-components-angular
npm install
- name: Build openvidu-angular
run: npm run lib:build --prefix openvidu-components-angular
- name: Build openvidu-webcomponent
run: npm run webcomponent:build --prefix openvidu-components-angular
- name: Serve Webcomponent Testapp
run: npm run webcomponent:serve-testapp --prefix openvidu-components-angular &
- name: Wait for openvidu-local-deployment
run: |
until curl -s -f -o /dev/null http://localhost:7880; do
echo "Waiting for openvidu-local-deployment to be ready..."
sleep 5
done
- name: Wait for openvidu-components-angular Testapp
run: |
until curl -s -f -o /dev/null http://localhost:8080; do
echo "Waiting for openvidu-components-angular Testapp to be ready..."
sleep 5
done
- name: Run Webcomponent E2E
run: LAUNCH_MODE=CI npm run e2e:webcomponent-directives --prefix openvidu-components-angular
12 changes: 10 additions & 2 deletions openvidu-components-angular/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -95,15 +95,23 @@
"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-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",
"start": "ng serve --configuration development --open",
"start-prod": "npx http-server ./dist/openvidu-components-testapp/browser --port 4200",
"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: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: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"
Expand Down

0 comments on commit 17a6edb

Please sign in to comment.