-
Notifications
You must be signed in to change notification settings - Fork 465
165 lines (160 loc) · 6.31 KB
/
openvidu-components-angular-E2E.yml
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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
name: openvidu-components-angular E2E
on:
push:
branches:
- master
paths:
- 'openvidu-components-angular/**'
- '.github/workflows/openvidu-components-angular-E2E.yml'
pull_request:
branches:
- master
workflow_dispatch:
inputs:
commit_sha:
description: 'Commit SHA'
required: false
default: ''
jobs:
test_setup:
name: Test setup
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
ref: ${{ inputs.commit_sha || github.sha }}
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Commit URL
run: echo https://github.com/OpenVidu/openvidu/commit/${{ inputs.commit_sha || github.sha }}
- name: Send Dispatch Event
env:
GITHUB_TOKEN: ${{ secrets.OPENVIDU_DISPATCH_EVENT_GA }}
COMMIT_MESSAGE: ${{ github.event.head_commit.message || 'Manually' }}
COMMIT_URL: ${{ github.event.commits[0].url || 'Manually' }}
BRANCH_NAME: ${{ github.ref_name }}
run: |
curl -X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${GITHUB_TOKEN}" \
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:
needs: test_setup
name: OpenVidu Components Angular E2E 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'
- 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: 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
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-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
# webcomponent_e2e:
# needs: test_setup
# name: Webcomponent E2E CE tests
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# with:
# ref: ${{ inputs.commit_sha || github.sha }}
# - uses: actions/setup-node@v4
# with:
# node-version: '20'
# - uses: actions/download-artifact@v4
# with:
# name: openvidu-browser
# path: openvidu-components-angular
# - name: Run Browserless Chrome
# run: docker run -d -p 3000:3000 --network host browserless/chrome:1.57-chrome-stable
# - name: Run openvidu-server-kms
# run: |
# docker run -p 4443:4443 --rm -d \
# -e OPENVIDU_SECRET=MY_SECRET \
# openvidu/openvidu-dev:latest
# - name: Install openvidu-browser and dependencies
# run: |
# cd openvidu-components-angular
# npm install openvidu-browser-*.tgz
# - 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: Run Webcomponent E2E
# run: npm run webcomponent:e2e-ci --prefix openvidu-components-angular
# webcomponent_e2e_pro:
# if: false #Skip PRO test because infra is unstable
# needs: test_setup
# name: Webcomponent E2E PRO tests
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - uses: actions/setup-node@v4
# with:
# node-version: '20'
# - uses: actions/download-artifact@v4
# with:
# name: openvidu-browser
# path: openvidu-components-angular
# - name: Run Browserless Chrome
# run: docker run -d -p 3000:3000 --network host browserless/chrome:1.57-chrome-stable
# - name: Install openvidu-browser and dependencies
# run: |
# cd openvidu-components-angular
# npm install openvidu-browser-*.tgz
# - 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: Run Webcomponent E2E PRO
# env:
# OPENVIDU_SERVER_URL: ${{ secrets.OPENVIDU_CALL_NEXT_URL }}
# OPENVIDU_SECRET: ${{ secrets.OPENVIDU_CALL_NEXT_SECRET }}
# run: npm run webcomponent:e2e-pro-ci --prefix openvidu-components-angular