ci: add jest-junit for test reporting and update integration test workflow
This commit is contained in:
parent
51e2f9103f
commit
514965162d
18
.github/workflows/integration-test.yaml
vendored
18
.github/workflows/integration-test.yaml
vendored
@ -1,12 +1,5 @@
|
||||
name: Integration Tests
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
|
||||
@ -60,6 +53,15 @@ jobs:
|
||||
cd backend
|
||||
npm install
|
||||
npm run test:integration-rooms
|
||||
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
|
||||
|
||||
test-recordings:
|
||||
name: Recordings API Tests
|
||||
|
||||
47
backend/package-lock.json
generated
47
backend/package-lock.json
generated
@ -49,6 +49,7 @@
|
||||
"eslint-config-prettier": "9.0.0",
|
||||
"jest": "^29.7.0",
|
||||
"jest-fetch-mock": "^3.0.3",
|
||||
"jest-junit": "^16.0.0",
|
||||
"nodemon": "3.1.9",
|
||||
"openapi-generate-html": "^0.4.2",
|
||||
"openapi-zod-client": "1.18.2",
|
||||
@ -9043,6 +9044,45 @@
|
||||
"fsevents": "^2.3.2"
|
||||
}
|
||||
},
|
||||
"node_modules/jest-junit": {
|
||||
"version": "16.0.0",
|
||||
"resolved": "https://registry.npmjs.org/jest-junit/-/jest-junit-16.0.0.tgz",
|
||||
"integrity": "sha512-A94mmw6NfJab4Fg/BlvVOUXzXgF0XIH6EmTgJ5NDPp4xoKq0Kr7sErb+4Xs9nZvu58pJojz5RFGpqnZYJTrRfQ==",
|
||||
"dev": true,
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"mkdirp": "^1.0.4",
|
||||
"strip-ansi": "^6.0.1",
|
||||
"uuid": "^8.3.2",
|
||||
"xml": "^1.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10.12.0"
|
||||
}
|
||||
},
|
||||
"node_modules/jest-junit/node_modules/mkdirp": {
|
||||
"version": "1.0.4",
|
||||
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz",
|
||||
"integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"bin": {
|
||||
"mkdirp": "bin/cmd.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
}
|
||||
},
|
||||
"node_modules/jest-junit/node_modules/uuid": {
|
||||
"version": "8.3.2",
|
||||
"resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz",
|
||||
"integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"bin": {
|
||||
"uuid": "dist/bin/uuid"
|
||||
}
|
||||
},
|
||||
"node_modules/jest-leak-detector": {
|
||||
"version": "29.7.0",
|
||||
"resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-29.7.0.tgz",
|
||||
@ -13124,6 +13164,13 @@
|
||||
"node": "^12.13.0 || ^14.15.0 || >=16.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/xml": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/xml/-/xml-1.0.1.tgz",
|
||||
"integrity": "sha512-huCv9IH9Tcf95zuYCsQraZtWnJvBtLVE0QHMOs8bWyZAFZNDcYjsPq1nEx8jKA9y+Beo9v+7OBPRisQTjinQMw==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/xtend": {
|
||||
"version": "4.0.2",
|
||||
"resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz",
|
||||
|
||||
@ -36,10 +36,10 @@
|
||||
"package:build": "npm run build:prod && npm pack",
|
||||
"lib:sync-pro": "npm run package:build && cp openvidu-meet-server-*.tgz ../../openvidu-meet-pro/backend",
|
||||
"typings:sync": "npm run sync-ce --prefix ../typings",
|
||||
"test:integration": "node --experimental-vm-modules node_modules/.bin/jest --runInBand --forceExit --testPathPattern \"tests/integration\"",
|
||||
"test:integration-rooms": "node --experimental-vm-modules node_modules/.bin/jest --runInBand --forceExit --testPathPattern \"tests/integration/api/rooms\"",
|
||||
"test:integration-recordings": "node --experimental-vm-modules node_modules/.bin/jest --runInBand --forceExit --testPathPattern \"tests/integration/api/recordings\"",
|
||||
"test:integration-security": "node --experimental-vm-modules node_modules/.bin/jest --runInBand --forceExit --testPathPattern \"tests/integration/api/security\"",
|
||||
"test:integration": "node --experimental-vm-modules node_modules/.bin/jest --runInBand --forceExit --testPathPattern \"tests/integration\" --ci --reporters=default --reporters=jest-junit",
|
||||
"test:integration-rooms": "node --experimental-vm-modules node_modules/.bin/jest --runInBand --forceExit --testPathPattern \"tests/integration/api/rooms\" --ci --reporters=default --reporters=jest-junit",
|
||||
"test:integration-recordings": "node --experimental-vm-modules node_modules/.bin/jest --runInBand --forceExit --testPathPattern \"tests/integration/api/recordings\" --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",
|
||||
"lint:fix": "eslint src --fix",
|
||||
"format:code": "prettier --ignore-path .gitignore --write '**/*.{ts,js,json,md}'"
|
||||
},
|
||||
@ -84,6 +84,7 @@
|
||||
"eslint-config-prettier": "9.0.0",
|
||||
"jest": "^29.7.0",
|
||||
"jest-fetch-mock": "^3.0.3",
|
||||
"jest-junit": "^16.0.0",
|
||||
"nodemon": "3.1.9",
|
||||
"openapi-generate-html": "^0.4.2",
|
||||
"openapi-zod-client": "1.18.2",
|
||||
@ -93,5 +94,9 @@
|
||||
"ts-jest-resolver": "^2.0.1",
|
||||
"ts-node": "10.9.2",
|
||||
"typescript": "5.4.5"
|
||||
},
|
||||
"jest-junit": {
|
||||
"outputDirectory": "test-results",
|
||||
"outputName": "junit.xml"
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user