forked from codeurjc-students/openvidu-tutorials-tests
-
Notifications
You must be signed in to change notification settings - Fork 0
72 lines (54 loc) · 2.02 KB
/
openvidu-recording-java-tutorial.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
name: openvidu-recording-java-tutorial
on:
workflow_dispatch: {}
push:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]
- name: Create recording directory
run: |
sudo mkdir -p /opt/openvidu/recordings
sudo chmod -R a+rwx /opt/openvidu/recordings
- name: Run OpenVidu deployment
run: |
docker run -p 4443:4443 --rm \
-e OPENVIDU_SECRET=MY_SECRET \
-e OPENVIDU_RECORDING=true \
-e OPENVIDU_RECORDING_PATH=/opt/openvidu/recordings \
-v /var/run/docker.sock:/var/run/docker.sock \
-v /opt/openvidu/recordings:/opt/openvidu/recordings \
openvidu/openvidu-dev:2.29.0 > results/logs/docker.log 2>&1 &
sleep 10
- name: Set up Java
uses: actions/setup-java@v2
with:
distribution: 'temurin'
java-version: '11' # Puedes cambiar la versión de Java según tus necesidades
- name: Run server application sample
working-directory: openvidu-recording-java
run: |
mvn package exec:java > ../results/logs/mvnpackage_log.txt 2>&1 &
sleep 10
- name: Install dependencies
run: npm ci
- name: Install Playwright Browsers
run: npx playwright install
- name: Install playwright-test
run: npm install @playwright/test
- name: Runin Test
working-directory: tests
run: |
npx playwright test tests/openvidu-recording-java-tutorial.spec.js
- name: Copy recordings
working-directory: /opt/openvidu/recordings
run: |
sudo zip -r /home/runner/work/openvidu-tutorials-tests-playwright/openvidu-tutorials-tests-playwright/results/recordings.zip .
- uses: actions/upload-artifact@v3
if: always()
with:
name: results-recording-java
path: /home/runner/work/openvidu-tutorials-tests-playwright/openvidu-tutorials-tests-playwright/results/
retention-days: 30