ci: Update cleanup action to ensure steps continue on error

This commit is contained in:
Carlos Santos 2025-05-08 12:21:11 +02:00
parent 8b89a72754
commit d4f3b48082
2 changed files with 10 additions and 19 deletions

View File

@ -1,9 +1,10 @@
name: 'OpenVidu Meet Cleanup'
description: 'Clean up OpenVidu Meet test environment'
runs:
using: "composite"
using: 'composite'
steps:
- name: Show pre-cleanup status
continue-on-error: true
run: |
echo "=== System status before cleanup ==="
df -h
@ -19,6 +20,7 @@ runs:
shell: bash
- name: Stop OpenVidu Local Deployment containers
continue-on-error: true
run: |
if [ -d "openvidu-local-deployment/community" ]; then
cd openvidu-local-deployment/community
@ -29,6 +31,7 @@ runs:
shell: bash
- name: Clean up temporary files
continue-on-error: true
run: |
echo "Cleaning temporary files..."
rm -rf /tmp/openvidu-* || echo "Warning: Failed to clean some OpenVidu temp files"
@ -36,6 +39,7 @@ runs:
shell: bash
- name: Check for running containers
continue-on-error: true
run: |
CONTAINERS=$(docker ps -q)
if [ -n "$CONTAINERS" ]; then
@ -45,12 +49,14 @@ runs:
shell: bash
- name: Clean up Docker resources
continue-on-error: true
run: |
echo "Pruning Docker system..."
docker system prune -f --volumes || echo "Warning: Docker system prune failed"
shell: bash
- name: Kill orphaned processes
continue-on-error: true
run: |
echo "Checking for orphaned processes..."
ORPHANED=$(ps aux | grep -i 'npm\|node\|livekit' | grep -v grep | awk '{print $2}')
@ -63,6 +69,7 @@ runs:
shell: bash
- name: Clean specific directories
continue-on-error: true
run: |
echo "Cleaning specific directories..."
# Don't try to remove the entire working directory
@ -79,10 +86,11 @@ runs:
shell: bash
- name: Show system status
continue-on-error: true
run: |
echo "=== System status after cleanup ==="
df -h
free -h
docker ps -a
echo "=== Cleanup completed ==="
shell: bash
shell: bash

View File

@ -14,25 +14,8 @@ jobs:
run: npm install -g yarn
- name: Install wait-on
run: npm install -g wait-on
- name: Install LK CLI
run: curl -sSL https://get.livekit.io/cli | bash
- name: Checkout OpenVidu Meet
uses: actions/checkout@v4
- name: Checkout OpenVidu Local Deployment
uses: actions/checkout@v4
with:
repository: OpenVidu/openvidu-local-deployment
ref: development
path: openvidu-local-deployment
- name: Configure Local Deployment
shell: bash
run: |
cd openvidu-local-deployment/community
./configure_lan_private_ip_linux.sh
docker compose up -d
- name: Wait for OpenVidu Local Deployment to Start
run: wait-on --timeout 60000 http://localhost:7880
- name: Setup OpenVidu Meet
shell: bash
run: |