get modifications

WORK-RHA
Rémi REGNAULT 1 year ago
parent e05f55a934
commit 3ee3149d50

@ -25,7 +25,7 @@ steps:
- npm install
- npm run build
- name: test
- name: publish-jest-reports
image: node:latest
environment:
DB_USERNAME:
@ -40,7 +40,7 @@ steps:
from_secret: SECRET_DB_PORT
commands:
- cd ./API-Project
- npm run test
- npm run test:coverage
depends_on: [ api-build ]
- name: docker-build-and-push
@ -102,5 +102,5 @@ steps:
- unzip -o $HOME/.sonar/sonar-scanner.zip -d $HOME/.sonar/
- export PATH=$SONAR_SCANNER_HOME/bin:$PATH
- export SONAR_SCANNER_OPTS="-server"
- sonar-scanner -D sonar.projectKey=LeftOvers_Api -D sonar.sources=. -D sonar.host.url=https://codefirst.iut.uca.fr/sonar
depends_on: [ api-build ]
- sonar-scanner -D sonar.projectKey=LeftOvers_Api -D sonar.sources=. -D sonar.host.url=https://codefirst.iut.uca.fr/sonar -D sonar.testExecutionReportPaths=./coverage/sonar-report.xml
depends_on: [ publish-jest-reports ]

@ -1,13 +0,0 @@
module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
moduleNameMapper: {
'^@/(.*)$': '<rootDir>/src/$1',
},
testMatch: ['<rootDir>/tests/**/*.spec.ts'],
globals: {
'ts-jest': {
tsconfig: 'tsconfig.json',
},
},
};

@ -27,6 +27,7 @@
"@types/pg": "^8.10.9",
"@types/supertest": "^2.0.16",
"jest": "^29.7.0",
"jest-sonar-reporter": "^2.0.0",
"ts-jest": "^29.1.1"
}
},
@ -3662,6 +3663,18 @@
"node": "^14.15.0 || ^16.10.0 || >=18.0.0"
}
},
"node_modules/jest-sonar-reporter": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/jest-sonar-reporter/-/jest-sonar-reporter-2.0.0.tgz",
"integrity": "sha512-ZervDCgEX5gdUbdtWsjdipLN3bKJwpxbvhkYNXTAYvAckCihobSLr9OT/IuyNIRT1EZMDDwR6DroWtrq+IL64w==",
"dev": true,
"dependencies": {
"xml": "^1.0.1"
},
"engines": {
"node": ">=8.0.0"
}
},
"node_modules/jest-util": {
"version": "29.7.0",
"resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.7.0.tgz",
@ -5661,6 +5674,12 @@
"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
},
"node_modules/xtend": {
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz",

@ -8,7 +8,8 @@
"build": "tsup src/server.ts --format cjs --clean",
"dev": "nodemon --watch src -e js,ts,json --exec \"ts-node src/server.ts\"",
"test": "jest",
"test:watch": "jest --watchAll"
"test:watch": "jest --watchAll",
"test:coverage": "jest --coverage"
},
"author": "",
"license": "ISC",
@ -31,6 +32,15 @@
"@types/pg": "^8.10.9",
"@types/supertest": "^2.0.16",
"jest": "^29.7.0",
"jest-sonar-reporter": "^2.0.0",
"ts-jest": "^29.1.1"
},
"jest": {
"testResultsProcessor": "jest-sonar-reporter",
"preset": "ts-jest"
},
"jestSonar": {
"reportPath": "./reports",
"reportFile": "report.test.xml"
}
}

Loading…
Cancel
Save