diff --git a/.github/actions/setup-openvidu-meet/action.yml b/.github/actions/setup-openvidu-meet/action.yml new file mode 100644 index 0000000..6e402c1 --- /dev/null +++ b/.github/actions/setup-openvidu-meet/action.yml @@ -0,0 +1,15 @@ +name: Setup OpenVidu Meet Backend +description: Prepara y arranca el backend de OpenVidu Meet y espera a que esté disponible +runs: + using: "composite" + steps: + - name: Prepare OpenVidu Meet + shell: bash + run: | + ./prepare.sh + cd backend + npm install + npm run start:prod & + - name: Wait for OpenVidu Meet to Start + shell: bash + run: wait-on --timeout 30000 http://localhost:6080/meet/health diff --git a/.github/workflows/backend-integration-test.yaml b/.github/workflows/backend-integration-test.yaml index a3933a9..1149e01 100644 --- a/.github/workflows/backend-integration-test.yaml +++ b/.github/workflows/backend-integration-test.yaml @@ -20,17 +20,8 @@ jobs: uses: actions/checkout@v4 - name: Setup OpenVidu Local Deployment uses: ./.github/actions/setup-local-deployment - - name: Wait for OpenVidu Local Deployment to Start - run: wait-on --timeout 60000 http://localhost:7880 - name: Setup OpenVidu Meet - shell: bash - run: | - ./prepare.sh - cd backend - npm install - npm run start:prod & - - name: Wait for OpenVidu Meet to Start - run: wait-on --timeout 30000 http://localhost:6080/meet/health + uses: ./.github/actions/setup-openvidu-meet - name: Run tests run: | cd backend @@ -67,16 +58,8 @@ jobs: uses: actions/checkout@v4 - name: Setup OpenVidu Local Deployment uses: ./.github/actions/setup-local-deployment - - name: Wait for OpenVidu Local Deployment to Start - run: wait-on --timeout 60000 http://localhost:7880 - name: Setup OpenVidu Meet - run: | - ./prepare.sh - cd backend - npm install - npm run start:prod & - - name: Wait for OpenVidu Meet to Start - run: wait-on --timeout 30000 http://localhost:6080/meet/health + uses: ./.github/actions/setup-openvidu-meet - name: Run tests run: | cd backend @@ -112,16 +95,8 @@ jobs: uses: actions/checkout@v4 - name: Setup OpenVidu Local Deployment uses: ./.github/actions/setup-local-deployment - - name: Wait for OpenVidu Local Deployment to Start - run: wait-on --timeout 60000 http://localhost:7880 - name: Setup OpenVidu Meet - run: | - ./prepare.sh - cd backend - npm install - npm run start:prod & - - name: Wait for OpenVidu Meet to Start - run: wait-on --timeout 30000 http://localhost:6080/meet/health + uses: ./.github/actions/setup-openvidu-meet - name: Run tests run: | cd backend @@ -157,16 +132,8 @@ jobs: uses: actions/checkout@v4 - name: Setup OpenVidu Local Deployment uses: ./.github/actions/setup-local-deployment - - name: Wait for OpenVidu Local Deployment to Start - run: wait-on --timeout 60000 http://localhost:7880 - name: Setup OpenVidu Meet - run: | - ./prepare.sh - cd backend - npm install - npm run start:prod & - - name: Wait for OpenVidu Meet to Start - run: wait-on --timeout 30000 http://localhost:6080/meet/health + uses: ./.github/actions/setup-openvidu-meet - name: Run tests run: | cd backend @@ -202,16 +169,8 @@ jobs: uses: actions/checkout@v4 - name: Setup OpenVidu Local Deployment uses: ./.github/actions/setup-local-deployment - - name: Wait for OpenVidu Local Deployment to Start - run: wait-on --timeout 60000 http://localhost:7880 - name: Setup OpenVidu Meet - run: | - ./prepare.sh - cd backend - npm install - npm run start:prod & - - name: Wait for OpenVidu Meet to Start - run: wait-on --timeout 30000 http://localhost:6080/meet/health + uses: ./.github/actions/setup-openvidu-meet - name: Run tests run: | cd backend @@ -247,16 +206,8 @@ jobs: uses: actions/checkout@v4 - name: Setup OpenVidu Local Deployment uses: ./.github/actions/setup-local-deployment - - name: Wait for OpenVidu Local Deployment to Start - run: wait-on --timeout 60000 http://localhost:7880 - name: Setup OpenVidu Meet - run: | - ./prepare.sh - cd backend - npm install - npm run start:prod & - - name: Wait for OpenVidu Meet to Start - run: wait-on --timeout 30000 http://localhost:6080/meet/health + uses: ./.github/actions/setup-openvidu-meet - name: Run tests run: | cd backend @@ -290,29 +241,10 @@ jobs: 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 Local Deployment + uses: ./.github/actions/setup-local-deployment - name: Setup OpenVidu Meet - run: | - ./prepare.sh - cd backend - npm install - npm run start:prod & - - name: Wait for OpenVidu Meet to Start - run: wait-on --timeout 30000 http://localhost:6080/meet/health + uses: ./.github/actions/setup-openvidu-meet - name: Run tests run: | cd backend