Skip to content

Commit

Permalink
ci: Run E2E tests in parallel for improved performance
Browse files Browse the repository at this point in the history
  • Loading branch information
CSantosM committed Jul 29, 2024
1 parent 5fa86f4 commit b2e50aa
Showing 1 changed file with 70 additions and 10 deletions.
80 changes: 70 additions & 10 deletions .github/workflows/openvidu-components-angular-E2E.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ jobs:
https://api.github.com/repos/OpenVidu/openvidu-call/dispatches \
-d '{"event_type":"openvidu-components-angular","client_payload":{"commit-message":"'"$COMMIT_MESSAGE"'","commit-ref":"'"$COMMIT_URL"'", "branch-name":"'"$BRANCH_NAME"'"}}'
openvidu__components_angular_e2e:
nested_components_e2e_events:
needs: test_setup
name: OpenVidu Components Angular E2E tests
name: Nested events
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
Expand All @@ -66,12 +66,59 @@ jobs:
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-components-angular
run: npm run lib:build --prefix openvidu-components-angular
- name: Build openvidu-components-angular Testapp
run: npm run build --prefix openvidu-components-angular
- name: Serve openvidu-components-angular Testapp
run: npm run start --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 nested components E2E event tests
run: npm run e2e:nested-events-ci --prefix openvidu-components-angular

nested_components_e2e_directives:
needs: test_setup
name: Nested 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 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
Expand All @@ -88,14 +135,21 @@ jobs:
run: npm run build --prefix openvidu-components-angular
- name: Serve openvidu-components-angular Testapp
run: npm run start --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 openvidu-components-angular E2E
run: npm run lib:e2e-ci --prefix openvidu-components-angular
- name: Run nested components E2E directives tests
run: npm run e2e:nested-directives-ci --prefix openvidu-components-angular

# webcomponent_e2e:
# needs: test_setup
Expand All @@ -118,12 +172,6 @@ jobs:
# cd openvidu-local-deployment/community
# ./configure_lan_private_ip_linux.sh
# docker compose up -d
# - 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: Run openvidu-call-backend
# run: |
# git clone --depth 1 https://github.com/OpenVidu/openvidu-call
Expand All @@ -140,5 +188,17 @@ jobs:
# 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

0 comments on commit b2e50aa

Please sign in to comment.