backend: Add cleanup action and integrate it into the CI workflow
backend: Updated action extension file to yml backend: Update cleanup action path in integration tests backend: Add cleanup action and update integration tests to use it backend: Refactor integration tests to consistently checkout OpenVidu Meet
This commit is contained in:
parent
b12e1247c3
commit
12223ab43c
38
.github/actions/cleanup/action.yaml
vendored
Normal file
38
.github/actions/cleanup/action.yaml
vendored
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
name: 'OpenVidu Meet Cleanup'
|
||||||
|
description: 'Clean up OpenVidu Meet test environment'
|
||||||
|
runs:
|
||||||
|
using: "composite"
|
||||||
|
steps:
|
||||||
|
- name: Kill backend process
|
||||||
|
run: pkill -f "npm run start:prod" || true
|
||||||
|
shell: bash
|
||||||
|
|
||||||
|
- name: Stop OpenVidu Local Deployment containers
|
||||||
|
run: |
|
||||||
|
cd openvidu-local-deployment/community
|
||||||
|
docker compose down -v
|
||||||
|
shell: bash
|
||||||
|
|
||||||
|
- name: Clean up temporary files
|
||||||
|
run: |
|
||||||
|
rm -rf /tmp/openvidu-*
|
||||||
|
rm -rf /tmp/livekit-*
|
||||||
|
shell: bash
|
||||||
|
|
||||||
|
- name: Clean up Docker resources
|
||||||
|
run: docker system prune -f
|
||||||
|
shell: bash
|
||||||
|
|
||||||
|
- name: Kill orphaned processes
|
||||||
|
run: |
|
||||||
|
ps aux | grep -i 'npm\|node\|livekit' | grep -v grep || true
|
||||||
|
ps aux | grep -i 'npm\|node\|livekit' | grep -v grep | awk '{print $2}' | xargs kill -9 || true
|
||||||
|
shell: bash
|
||||||
|
|
||||||
|
- name: Show system status
|
||||||
|
run: |
|
||||||
|
echo "=== System status after cleanup ==="
|
||||||
|
df -h
|
||||||
|
free -h
|
||||||
|
docker ps -a
|
||||||
|
shell: bash
|
||||||
25
.github/workflows/integration-test.yaml
vendored
25
.github/workflows/integration-test.yaml
vendored
@ -16,6 +16,8 @@ jobs:
|
|||||||
run: npm install -g wait-on
|
run: npm install -g wait-on
|
||||||
- name: Install LK CLI
|
- name: Install LK CLI
|
||||||
run: curl -sSL https://get.livekit.io/cli | bash
|
run: curl -sSL https://get.livekit.io/cli | bash
|
||||||
|
- name: Checkout OpenVidu Meet
|
||||||
|
uses: actions/checkout@v4
|
||||||
- name: Checkout OpenVidu Local Deployment
|
- name: Checkout OpenVidu Local Deployment
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
@ -31,7 +33,6 @@ jobs:
|
|||||||
docker compose up -d
|
docker compose up -d
|
||||||
- name: Wait for OpenVidu Local Deployment to Start
|
- name: Wait for OpenVidu Local Deployment to Start
|
||||||
run: wait-on --timeout 60000 http://localhost:7880
|
run: wait-on --timeout 60000 http://localhost:7880
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- name: Setup OpenVidu Meet
|
- name: Setup OpenVidu Meet
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
@ -54,6 +55,9 @@ jobs:
|
|||||||
report_paths: '**/reports/junit.xml'
|
report_paths: '**/reports/junit.xml'
|
||||||
fail_on_failure: true
|
fail_on_failure: true
|
||||||
require_tests: true
|
require_tests: true
|
||||||
|
- name: Clean up
|
||||||
|
if: always()
|
||||||
|
uses: ./.github/actions/cleanup
|
||||||
|
|
||||||
test-recordings:
|
test-recordings:
|
||||||
name: Recordings API Tests
|
name: Recordings API Tests
|
||||||
@ -70,6 +74,8 @@ jobs:
|
|||||||
run: npm install -g wait-on
|
run: npm install -g wait-on
|
||||||
- name: Install LK CLI
|
- name: Install LK CLI
|
||||||
run: curl -sSL https://get.livekit.io/cli | bash
|
run: curl -sSL https://get.livekit.io/cli | bash
|
||||||
|
- name: Checkout OpenVidu Meet
|
||||||
|
uses: actions/checkout@v4
|
||||||
- name: Checkout OpenVidu Local Deployment
|
- name: Checkout OpenVidu Local Deployment
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
@ -86,7 +92,6 @@ jobs:
|
|||||||
|
|
||||||
- name: Wait for OpenVidu Local Deployment to Start
|
- name: Wait for OpenVidu Local Deployment to Start
|
||||||
run: wait-on --timeout 60000 http://localhost:7880
|
run: wait-on --timeout 60000 http://localhost:7880
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- name: Setup OpenVidu Meet
|
- name: Setup OpenVidu Meet
|
||||||
run: |
|
run: |
|
||||||
./prepare.sh
|
./prepare.sh
|
||||||
@ -108,6 +113,9 @@ jobs:
|
|||||||
report_paths: '**/reports/junit.xml'
|
report_paths: '**/reports/junit.xml'
|
||||||
fail_on_failure: true
|
fail_on_failure: true
|
||||||
require_tests: true
|
require_tests: true
|
||||||
|
- name: Clean up
|
||||||
|
if: always()
|
||||||
|
uses: ./.github/actions/cleanup
|
||||||
|
|
||||||
test-webhooks:
|
test-webhooks:
|
||||||
name: Webhook Tests
|
name: Webhook Tests
|
||||||
@ -123,6 +131,8 @@ jobs:
|
|||||||
run: npm install -g wait-on
|
run: npm install -g wait-on
|
||||||
- name: Install LK CLI
|
- name: Install LK CLI
|
||||||
run: curl -sSL https://get.livekit.io/cli | bash
|
run: curl -sSL https://get.livekit.io/cli | bash
|
||||||
|
- name: Checkout OpenVidu Meet
|
||||||
|
uses: actions/checkout@v4
|
||||||
- name: Checkout OpenVidu Local Deployment
|
- name: Checkout OpenVidu Local Deployment
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
@ -138,7 +148,6 @@ jobs:
|
|||||||
|
|
||||||
- name: Wait for OpenVidu Local Deployment to Start
|
- name: Wait for OpenVidu Local Deployment to Start
|
||||||
run: wait-on --timeout 60000 http://localhost:7880
|
run: wait-on --timeout 60000 http://localhost:7880
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- name: Setup OpenVidu Meet
|
- name: Setup OpenVidu Meet
|
||||||
run: |
|
run: |
|
||||||
./prepare.sh
|
./prepare.sh
|
||||||
@ -160,6 +169,9 @@ jobs:
|
|||||||
report_paths: '**/reports/junit.xml'
|
report_paths: '**/reports/junit.xml'
|
||||||
fail_on_failure: true
|
fail_on_failure: true
|
||||||
require_tests: true
|
require_tests: true
|
||||||
|
- name: Clean up
|
||||||
|
if: always()
|
||||||
|
uses: ./.github/actions/cleanup
|
||||||
|
|
||||||
test-security:
|
test-security:
|
||||||
name: Security API Tests
|
name: Security API Tests
|
||||||
@ -175,13 +187,14 @@ jobs:
|
|||||||
run: npm install -g wait-on
|
run: npm install -g wait-on
|
||||||
- name: Install LK CLI
|
- name: Install LK CLI
|
||||||
run: curl -sSL https://get.livekit.io/cli | bash
|
run: curl -sSL https://get.livekit.io/cli | bash
|
||||||
|
- name: Checkout OpenVidu Meet
|
||||||
|
uses: actions/checkout@v4
|
||||||
- name: Checkout OpenVidu Local Deployment
|
- name: Checkout OpenVidu Local Deployment
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
repository: OpenVidu/openvidu-local-deployment
|
repository: OpenVidu/openvidu-local-deployment
|
||||||
ref: development
|
ref: development
|
||||||
path: openvidu-local-deployment
|
path: openvidu-local-deployment
|
||||||
|
|
||||||
- name: Configure Local Deployment
|
- name: Configure Local Deployment
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
@ -191,7 +204,6 @@ jobs:
|
|||||||
|
|
||||||
- name: Wait for OpenVidu Local Deployment to Start
|
- name: Wait for OpenVidu Local Deployment to Start
|
||||||
run: wait-on --timeout 60000 http://localhost:7880
|
run: wait-on --timeout 60000 http://localhost:7880
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- name: Setup OpenVidu Meet
|
- name: Setup OpenVidu Meet
|
||||||
run: |
|
run: |
|
||||||
./prepare.sh
|
./prepare.sh
|
||||||
@ -213,3 +225,6 @@ jobs:
|
|||||||
report_paths: '**/reports/junit.xml'
|
report_paths: '**/reports/junit.xml'
|
||||||
fail_on_failure: true
|
fail_on_failure: true
|
||||||
require_tests: true
|
require_tests: true
|
||||||
|
- name: Clean up
|
||||||
|
if: always()
|
||||||
|
uses: ./.github/actions/cleanup
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user