Skip to content

Commit

Permalink
updarte node-recording
Browse files Browse the repository at this point in the history
  • Loading branch information
IsmailJniah committed Nov 15, 2023
1 parent b55e5db commit 6833bfd
Showing 1 changed file with 17 additions and 19 deletions.
36 changes: 17 additions & 19 deletions .github/workflows/openvidu-recording-node-tutorial.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,65 +2,63 @@ name: openvidu-recording-node-tutorial

on:
workflow_dispatch: {}
push:
push:

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout
- name: Checkout código
uses: actions/[email protected]

- name: Create recording directory
- name: Crear directorio recording
run: |
sudo mkdir -p /opt/openvidu/recordings
sudo chmod -R a+rwx /opt/openvidu/recordings
- name: Run OpenVidu deployment
- name: Levantar OpenVidu
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 &
openvidu/openvidu-dev:2.28.0 > results/logs/docker.log 2>&1 &
sleep 10
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4.0.0

- name: Run server application sample
working-directory: openvidu-recording-node
- name: Ejecutar la aplicación del servidor

run: |
cd openvidu-recording-node
npm install
node server.js http://localhost:4443 MY_SECRET > ../results/logs/node_server.log 2>&1 &
sleep 20
sleep 10
- name: Install dependencies
run: npm ci

- uses: browser-actions/setup-chrome@v1

- name: Install Playwright Browsers
run: npx playwright install

- name: Install playwright-test
run: npm install @playwright/test
run: npx playwright install

- name: Runin Test
working-directory: tests
run: |
npx playwright test openvidu-recording-node-tutorial.spec.js
run: |
cd tests
npx playwright test tests/openvidu-recording-node-tutorial.spec.js
- name: Copy recordings
working-directory: /opt/openvidu/recordings
run: |
cd /opt/openvidu/recordings
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-node
name: results
path: /home/runner/work/openvidu-tutorials-tests-playwright/openvidu-tutorials-tests-playwright/results/
retention-days: 30
retention-days: 30

0 comments on commit 6833bfd

Please sign in to comment.