Skip to content

Commit b2e50aa

Browse files
committed
ci: Run E2E tests in parallel for improved performance
1 parent 5fa86f4 commit b2e50aa

1 file changed

Lines changed: 70 additions & 10 deletions

File tree

.github/workflows/openvidu-components-angular-E2E.yml

Lines changed: 70 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@ jobs:
4545
https://api.github.com/repos/OpenVidu/openvidu-call/dispatches \
4646
-d '{"event_type":"openvidu-components-angular","client_payload":{"commit-message":"'"$COMMIT_MESSAGE"'","commit-ref":"'"$COMMIT_URL"'", "branch-name":"'"$BRANCH_NAME"'"}}'
4747
48-
openvidu__components_angular_e2e:
48+
nested_components_e2e_events:
4949
needs: test_setup
50-
name: OpenVidu Components Angular E2E tests
50+
name: Nested events
5151
runs-on: ubuntu-latest
5252
steps:
5353
- name: Checkout Repository
@@ -66,12 +66,59 @@ jobs:
6666
cd openvidu-local-deployment/community
6767
./configure_lan_private_ip_linux.sh
6868
docker compose up -d
69+
- name: Run openvidu-call-backend
70+
run: |
71+
git clone --depth 1 https://github.com/OpenVidu/openvidu-call
72+
cd openvidu-call/openvidu-call-back
73+
npm install
74+
npm run dev:start &
75+
- name: Install dependencies
76+
run: |
77+
cd openvidu-components-angular
78+
npm install
79+
- name: Build openvidu-components-angular
80+
run: npm run lib:build --prefix openvidu-components-angular
81+
- name: Build openvidu-components-angular Testapp
82+
run: npm run build --prefix openvidu-components-angular
83+
- name: Serve openvidu-components-angular Testapp
84+
run: npm run start --prefix openvidu-components-angular &
6985
- name: Wait for openvidu-local-deployment
7086
run: |
7187
until curl -s -f -o /dev/null http://localhost:7880; do
7288
echo "Waiting for openvidu-local-deployment to be ready..."
7389
sleep 5
7490
done
91+
92+
- name: Wait for openvidu-components-angular Testapp
93+
run: |
94+
until curl -s -f -o /dev/null http://localhost:4200; do
95+
echo "Waiting for openvidu-components-angular Testapp to be ready..."
96+
sleep 5
97+
done
98+
- name: Run nested components E2E event tests
99+
run: npm run e2e:nested-events-ci --prefix openvidu-components-angular
100+
101+
nested_components_e2e_directives:
102+
needs: test_setup
103+
name: Nested directives
104+
runs-on: ubuntu-latest
105+
steps:
106+
- name: Checkout Repository
107+
uses: actions/checkout@v4
108+
with:
109+
ref: ${{ inputs.commit_sha || github.sha }}
110+
- name: Setup Node.js
111+
uses: actions/setup-node@v4
112+
with:
113+
node-version: '20'
114+
- name: Run Browserless Chrome
115+
run: docker run -d -p 3000:3000 --network host browserless/chrome:1.57-chrome-stable
116+
- name: Run openvidu-local-deployment
117+
run: |
118+
git clone --depth 1 https://github.com/OpenVidu/openvidu-local-deployment
119+
cd openvidu-local-deployment/community
120+
./configure_lan_private_ip_linux.sh
121+
docker compose up -d
75122
- name: Run openvidu-call-backend
76123
run: |
77124
git clone --depth 1 https://github.com/OpenVidu/openvidu-call
@@ -88,14 +135,21 @@ jobs:
88135
run: npm run build --prefix openvidu-components-angular
89136
- name: Serve openvidu-components-angular Testapp
90137
run: npm run start --prefix openvidu-components-angular &
138+
- name: Wait for openvidu-local-deployment
139+
run: |
140+
until curl -s -f -o /dev/null http://localhost:7880; do
141+
echo "Waiting for openvidu-local-deployment to be ready..."
142+
sleep 5
143+
done
144+
91145
- name: Wait for openvidu-components-angular Testapp
92146
run: |
93147
until curl -s -f -o /dev/null http://localhost:4200; do
94148
echo "Waiting for openvidu-components-angular Testapp to be ready..."
95149
sleep 5
96150
done
97-
- name: Run openvidu-components-angular E2E
98-
run: npm run lib:e2e-ci --prefix openvidu-components-angular
151+
- name: Run nested components E2E directives tests
152+
run: npm run e2e:nested-directives-ci --prefix openvidu-components-angular
99153

100154
# webcomponent_e2e:
101155
# needs: test_setup
@@ -118,12 +172,6 @@ jobs:
118172
# cd openvidu-local-deployment/community
119173
# ./configure_lan_private_ip_linux.sh
120174
# docker compose up -d
121-
# - name: Wait for openvidu-local-deployment
122-
# run: |
123-
# until curl -s -f -o /dev/null http://localhost:7880; do
124-
# echo "Waiting for openvidu-local-deployment to be ready..."
125-
# sleep 5
126-
# done
127175
# - name: Run openvidu-call-backend
128176
# run: |
129177
# git clone --depth 1 https://github.com/OpenVidu/openvidu-call
@@ -140,5 +188,17 @@ jobs:
140188
# run: npm run webcomponent:build --prefix openvidu-components-angular
141189
# - name: Serve Webcomponent Testapp
142190
# run: npm run webcomponent:serve-testapp --prefix openvidu-components-angular &
191+
# - name: Wait for openvidu-local-deployment
192+
# run: |
193+
# until curl -s -f -o /dev/null http://localhost:7880; do
194+
# echo "Waiting for openvidu-local-deployment to be ready..."
195+
# sleep 5
196+
# done
197+
# - name: Wait for openvidu-components-angular Testapp
198+
# run: |
199+
# until curl -s -f -o /dev/null http://localhost:4200; do
200+
# echo "Waiting for openvidu-components-angular Testapp to be ready..."
201+
# sleep 5
202+
# done
143203
# - name: Run Webcomponent E2E
144204
# run: npm run webcomponent:e2e-ci --prefix openvidu-components-angular

0 commit comments

Comments
 (0)