-
Notifications
You must be signed in to change notification settings - Fork 246
Expand file tree
/
Copy pathe2e-components-angular-tutorials.yml
More file actions
95 lines (85 loc) · 3.2 KB
/
e2e-components-angular-tutorials.yml
File metadata and controls
95 lines (85 loc) · 3.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
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