ci: add integration tests for participants API and update workflow
This commit is contained in:
parent
2406169700
commit
34312e16d3
56
.github/workflows/backend-integration-test.yaml
vendored
56
.github/workflows/backend-integration-test.yaml
vendored
@ -281,6 +281,62 @@ 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-participants:
|
||||||
|
name: Participants API Tests
|
||||||
|
runs-on: ov-actions-runner
|
||||||
|
steps:
|
||||||
|
- name: Setup Node.js
|
||||||
|
uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: '20'
|
||||||
|
- name: Setup yarn # Needed for the redlock package
|
||||||
|
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
|
||||||
|
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
|
||||||
|
- name: Run tests
|
||||||
|
run: |
|
||||||
|
cd backend
|
||||||
|
npm run test:participants
|
||||||
|
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
|
- name: Clean up
|
||||||
if: always()
|
if: always()
|
||||||
uses: ./.github/actions/cleanup
|
uses: ./.github/actions/cleanup
|
||||||
@ -42,6 +42,7 @@
|
|||||||
"test:integration-webhooks": "node --experimental-vm-modules node_modules/.bin/jest --runInBand --forceExit --testPathPattern \"tests/integration/webhooks\" --ci --reporters=default --reporters=jest-junit",
|
"test:integration-webhooks": "node --experimental-vm-modules node_modules/.bin/jest --runInBand --forceExit --testPathPattern \"tests/integration/webhooks\" --ci --reporters=default --reporters=jest-junit",
|
||||||
"test:integration-security": "node --experimental-vm-modules node_modules/.bin/jest --runInBand --forceExit --testPathPattern \"tests/integration/api/security\" --ci --reporters=default --reporters=jest-junit",
|
"test:integration-security": "node --experimental-vm-modules node_modules/.bin/jest --runInBand --forceExit --testPathPattern \"tests/integration/api/security\" --ci --reporters=default --reporters=jest-junit",
|
||||||
"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-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:unit": "node --experimental-vm-modules node_modules/.bin/jest --runInBand --forceExit --testPathPattern \"tests/unit\" --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",
|
"lint:fix": "eslint src --fix",
|
||||||
"format:code": "prettier --ignore-path .gitignore --write '**/*.{ts,js,json,md}'"
|
"format:code": "prettier --ignore-path .gitignore --write '**/*.{ts,js,json,md}'"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user