openvidu-components-angular #17
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: E2E Test Angular Components tutorials | |
| on: | |
| push: | |
| pull_request: | |
| repository_dispatch: | |
| types: [openvidu-components-angular] | |
| workflow_dispatch: | |
| jobs: | |
| build_and_start_tutorials: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22' | |
| - name: Run tests | |
| run: | | |
| cd openvidu-components-angular/test | |
| npm install | |
| ./run-test.sh | |
| demo_app_e2e_test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22' | |
| - name: Build OpenVidu Components Angular | |
| id: build | |
| uses: OpenVidu/actions/build-openvidu-components-angular@main | |
| - name: Download OpenVidu Components Angular package | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: ${{ steps.build.outputs.artifact_name }} | |
| path: './openvidu-components-angular/openvidu-demo-app' | |
| - name: Setup OpenVidu Local Deployment | |
| uses: OpenVidu/actions/start-openvidu-local-deployment@main | |
| with: | |
| ref-openvidu-local-deployment: "development" | |
| openvidu-edition: "community" | |
| - name: Install demo app dependencies | |
| run: | | |
| cd openvidu-components-angular/openvidu-demo-app | |
| npm install ${{ steps.build.outputs.package_filename }} --prefix frontend | |
| npm install --prefix backend | |
| npm run build --prefix backend | |
| npm run build-prod --prefix frontend | |
| - name: Run demo app | |
| env: | |
| DEMO_APP_PRIVATE_ACCESS: false | |
| run: npm start --prefix openvidu-components-angular/openvidu-demo-app/backend & | |
| - name: Create downloads directory | |
| run: | | |
| mkdir -p /tmp/openvidu-components-angular-demo-app-downloads | |
| chmod 777 /tmp/openvidu-components-angular-demo-app-downloads | |
| - name: Run Chrome Browser | |
| run: docker run --network=host -d -v /tmp/openvidu-components-angular-demo-app-downloads:/tmp/openvidu-components-angular-demo-app-downloads selenium/standalone-chrome:127.0 | |
| - name: Wait for Selenium to be ready | |
| run: | | |
| echo "Waiting for Selenium to be ready..." | |
| for i in {1..30}; do | |
| if curl -s http://localhost:4444/wd/hub/status > /dev/null; then | |
| echo "Selenium is ready!" | |
| break | |
| fi | |
| echo "Attempt $i: Selenium not ready yet, waiting..." | |
| sleep 2 | |
| done | |
| curl -s http://localhost:4444/wd/hub/status || (echo "Selenium failed to start" && exit 1) | |
| - name: Run E2E Home tests | |
| env: | |
| LAUNCH_MODE: CI | |
| run: npm run e2e:home --prefix openvidu-components-angular/openvidu-demo-app/frontend | |
| - name: Run Room Tests | |
| env: | |
| LAUNCH_MODE: CI | |
| run: npm run e2e:room --prefix openvidu-components-angular/openvidu-demo-app/frontend | |
| - name: Run Recordings Tests | |
| env: | |
| LAUNCH_MODE: CI | |
| run: npm run e2e:recordings --prefix openvidu-components-angular/openvidu-demo-app/frontend | |