From 89295dda930f9910da54af60f41e9c0905be4205 Mon Sep 17 00:00:00 2001 From: juancarmore Date: Mon, 9 Jun 2025 22:39:38 +0200 Subject: [PATCH] ci: add users API tests in integration tests workflow --- .../workflows/backend-integration-test.yaml | 31 +++++++++++++++++++ backend/package.json | 1 + 2 files changed, 32 insertions(+) diff --git a/.github/workflows/backend-integration-test.yaml b/.github/workflows/backend-integration-test.yaml index 13a9a34..dd10338 100644 --- a/.github/workflows/backend-integration-test.yaml +++ b/.github/workflows/backend-integration-test.yaml @@ -255,6 +255,37 @@ jobs: if: always() uses: OpenVidu/actions/cleanup@main + test-users: + name: Users API Tests + runs-on: ov-actions-runner + steps: + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '22.13' + - name: Install LK CLI + run: curl -sSL https://get.livekit.io/cli | bash + - name: Setup OpenVidu Local Deployment + uses: OpenVidu/actions/start-openvidu-local-deployment@main + - name: Setup OpenVidu Meet + uses: OpenVidu/actions/start-openvidu-meet@main + - name: Run tests + run: | + cd backend + npm run test:integration-users + env: + JEST_JUNIT_OUTPUT_DIR: './reports/' + - name: Publish Test Report + uses: mikepenz/action-junit-report@v4 + if: always() + with: + report_paths: '**/reports/junit.xml' + fail_on_failure: true + require_tests: true + - name: Clean up + if: always() + uses: OpenVidu/actions/cleanup@main + stop-runner: name: Stop EC2 runner needs: diff --git a/backend/package.json b/backend/package.json index 3736cf4..d7ed1f4 100644 --- a/backend/package.json +++ b/backend/package.json @@ -44,6 +44,7 @@ "test:integration-global-preferences": "node --experimental-vm-modules node_modules/.bin/jest --runInBand --forceExit --testPathPattern \"tests/integration/api/global-preferences\" --ci --reporters=default --reporters=jest-junit", "test:integration-participants": "node --experimental-vm-modules node_modules/.bin/jest --runInBand --forceExit --testPathPattern \"tests/integration/api/participants\" --ci --reporters=default --reporters=jest-junit", "test:integration-meetings": "node --experimental-vm-modules node_modules/.bin/jest --runInBand --forceExit --testPathPattern \"tests/integration/api/meetings\" --ci --reporters=default --reporters=jest-junit", + "test:integration-users": "node --experimental-vm-modules node_modules/.bin/jest --runInBand --forceExit --testPathPattern \"tests/integration/api/users\" --ci --reporters=default --reporters=jest-junit", "test:unit": "node --experimental-vm-modules node_modules/.bin/jest --runInBand --forceExit --testPathPattern \"tests/unit\" --ci --reporters=default --reporters=jest-junit", "lint:fix": "eslint src --fix", "format:code": "prettier --ignore-path .gitignore --write '**/*.{ts,js,json,md}'"