From fe3c8e3329ba5a135373e5ccbcdc28908d28d00b Mon Sep 17 00:00:00 2001 From: Oleksandr Vayda Date: Mon, 2 Nov 2020 23:42:48 +0100 Subject: [PATCH 1/2] Add a test status & coverage reporter for Teamcity --- jest.config.js | 4 +++- package-lock.json | 6 ++++++ package.json | 3 ++- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/jest.config.js b/jest.config.js index dc9aa8e4..abf0b30a 100644 --- a/jest.config.js +++ b/jest.config.js @@ -22,10 +22,12 @@ module.exports = { 'transformIgnorePatterns': [ 'node_modules/(?!@ngrx)' ], + "testResultsProcessor": "jest-teamcity-reporter", 'coverageReporters': [ 'text', 'html', - 'cobertura' + 'cobertura', + 'teamcity' ], 'moduleNameMapper': { "/spline-api/": "/projects/spline-api/src/public-api", diff --git a/package-lock.json b/package-lock.json index 41d229f3..84743962 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12048,6 +12048,12 @@ } } }, + "jest-teamcity-reporter": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/jest-teamcity-reporter/-/jest-teamcity-reporter-0.9.0.tgz", + "integrity": "sha512-q6W+ZaJSCIXmxC9wsY67zNn+vwG/EgKJygYJYH860jih5zS6mc2ZFc4v78gh6rgzgM9/siUtQm7SnRunYuWmVw==", + "dev": true + }, "jest-util": { "version": "25.5.0", "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-25.5.0.tgz", diff --git a/package.json b/package.json index a1c7a441..eadeaba2 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "start": "ng serve --open --port 4300", "start:localhost": "ng serve -c localhost --open --port 4300", "build": "ng build --prod --deploy-url=../ --base-href=/app/", - "test": "jest --passWithNoTests", + "test": "jest --passWithNoTests --coverage", "lint": "npm run lint:ts && npm run lint:styles", "lint:ts": "eslint src/**/*.ts projects/**/*.ts", "lint:styles": "stylelint src/**/*.scss", @@ -73,6 +73,7 @@ "husky": "^4.3.0", "jest": "^25.5.4", "jest-preset-angular": "^8.1.3", + "jest-teamcity-reporter": "^0.9.0", "lint-staged": "^10.1.3", "ng-packagr": "^9.0.0", "protractor": "~5.4.3", From cd0510d4510ec4a025fcadf0e87f79452d4b9d88 Mon Sep 17 00:00:00 2001 From: Oleksandr Vayda Date: Tue, 3 Nov 2020 02:33:20 +0100 Subject: [PATCH 2/2] + Sonarcloud enabling --- .sonarcloud.properties | 0 README.md | 6 ++++++ 2 files changed, 6 insertions(+) create mode 100644 .sonarcloud.properties diff --git a/.sonarcloud.properties b/.sonarcloud.properties new file mode 100644 index 00000000..e69de29b diff --git a/README.md b/README.md index d259d10f..d0dd55bd 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,9 @@ +[![TeamCity build (develop)](https://teamcity.jetbrains.com/app/rest/builds/aggregated/strob:%28locator:%28buildType:%28id:OpenSourceProjects_AbsaOSS_SplineUi_AutomaticBuilds%29,branch:develop%29%29/statusIcon.svg)](https://teamcity.jetbrains.com/viewType.html?buildTypeId=OpenSourceProjects_AbsaOSS_SplineUi_AutomaticBuilds&branch=develop&tab=buildTypeStatusDiv) +[![Sonarcloud Status](https://sonarcloud.io/api/project_badges/measure?project=AbsaOSS_spline-ui&metric=alert_status)](https://sonarcloud.io/dashboard?id=AbsaOSS_spline-ui) +[![SonarCloud Maintainability](https://sonarcloud.io/api/project_badges/measure?project=AbsaOSS_spline-ui&metric=sqale_rating)](https://sonarcloud.io/dashboard?id=AbsaOSS_spline-ui) +[![SonarCloud Reliability](https://sonarcloud.io/api/project_badges/measure?project=AbsaOSS_spline-ui&metric=reliability_rating)](https://sonarcloud.io/dashboard?id=AbsaOSS_spline-ui) +[![SonarCloud Security](https://sonarcloud.io/api/project_badges/measure?project=AbsaOSS_spline-ui&metric=security_rating)](https://sonarcloud.io/dashboard?id=AbsaOSS_spline-ui) + # Spline UI ## Config