forked from codeurjc-students/openvidu-tutorials-tests
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b55e5db
commit 6833bfd
Showing
1 changed file
with
17 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 |