Skip to content

Commit

Permalink
Adiciona configuração retroativo
Browse files Browse the repository at this point in the history
  • Loading branch information
art1505 committed Dec 3, 2023
1 parent bd69d4d commit 39eab8c
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 33 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@ on:
push:
branches:
- main
- test/sonarcloud
- develop
- sonar/teste
- release-sonar
pull_request:
# types: [opened, synchronize, reopened]
types: [opened, synchronize, reopened]
jobs:
test-unit:
name: Test Unit & Scan
Expand Down Expand Up @@ -52,4 +54,4 @@ jobs:
run: |
docker-compose -f docker-compose.test.yml up -V --force-recreate --build --abort-on-container-exit --exit-code-from gerocuidado-forum-api-test
env:
TEST: e2e
TEST: e2e
46 changes: 23 additions & 23 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,24 @@
"format": "prettier --write \"src/**/*.ts\" \"e2e/**/*.ts\"",
"start": "nest start --preserveWatchOutput",
"start:dev": "nest start --watch --preserveWatchOutput",
"start:debug": "nest start --debug 0.0.0.0:7002 --watch --preserveWatchOutput",
"start:debug": "nest start --debug 0.0.0.0:7001 --watch --preserveWatchOutput",
"start:prod": "node dist/main",
"lint": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix",
"test": "jest --passWithNoTests --no-cache --runInBand",
"test:all": "CI=true npm run test -- --coverage",
"test": "jest --passWithNoTests --no-cache --runInBand --detectOpenHandles --coverage --colors",
"test:watch": "jest --watchAll",
"test:cov": "jest --forceExit --detectOpenHandles --runInBand --coverage --colors",
"test:cov": "jest --runInBand --coverage --colors",
"test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand",
"test:e2e": "jest --forceExit --detectOpenHandles --colors --config ./e2e/jest-e2e.json",
"test:e2e:cov": "jest --forceExit --detectOpenHandles --runInBand --colors --coverage --config ./e2e/jest-e2e.json",
"test:e2e:cov": "jest --runInBand --forceExit --detectOpenHandles --colors --coverage --config ./e2e/jest-e2e.json",
"test:e2e:watch": "jest --detectOpenHandles --config ./e2e/jest-e2e.json --watchAll",
"typeorm": "node --require ts-node/register ./node_modules/typeorm/cli.js",
"typeorm:create": "npm run typeorm migration:create",
"typeorm:revert": "npm run typeorm migration:revert -- -d src/ormconfig.ts",
"typeorm:migrate": "npm run typeorm migration:generate -- -d src/ormconfig.ts",
"typeorm:run": "./node_modules/.bin/typeorm-ts-node-commonjs migration:run -d src/ormconfig.ts",
"schema:drop": "npm run typeorm schema:drop",
"sonar": "sonar-scanner",
"schema:sync": "npm run typeorm schema:sync"
},
"dependencies": {
Expand Down Expand Up @@ -55,6 +56,7 @@
"dotenv": "10.0.0",
"express-actuator": "1.8.2",
"helmet": "6.0.0",
"jest-sonar-reporter": "^2.0.0",
"passport": "0.5.2",
"passport-jwt": "4.0.0",
"passport-local": "1.0.0",
Expand Down Expand Up @@ -89,11 +91,9 @@
"eslint-config-prettier": "8.4.0",
"eslint-plugin-prettier": "4.0.0",
"graphql": "16.6.0",
"jest": "^29.7.0",
"jest-junit": "^16.0.0",
"jest": "^29.2.1",
"jest-mock-extended": "^3.0.5",
"jest-sonar": "^0.2.16",
"jest-sonar-reporter": "^2.0.0",
"jest-mock-extended": "^3.0.5",
"prettier": "2.5.1",
"sonarqube-scanner": "2.8.1",
"source-map-support": "0.5.21",
Expand All @@ -109,7 +109,7 @@
"esbenp.prettier-vscode",
"rbbit.typescript-hero"
],
"jest": {
"jest": {
"moduleFileExtensions": [
"js",
"json",
Expand All @@ -120,9 +120,21 @@
"transform": {
"^.+\\.(t|j)s$": "ts-jest"
},
"collectCoverage": true,
"collectCoverageFrom": [
"**/*.(t|j)s"
],
"reporters": [
"default",
[
"jest-sonar",
{
"outputDirectory": "reports",
"outputName": "sonar-report.xml",
"relativeRootDir": "."
}
]
],
"coverageDirectory": "../coverage/unit",
"coveragePathIgnorePatterns": [
"src/migration",
Expand All @@ -136,18 +148,6 @@
".factory.ts$",
"src/migration"
],
"testEnvironment": "node",
"reporters": [
"default",
[
"jest-sonar",
{
"outputDirectory": "reports",
"outputName": "sonar-report.xml",
"reportedMetrics": ["test_errors", "test_execution_time", "test_failures", "tests", "coverage"]
}
]
]
"testEnvironment": "node"
}
}

}
18 changes: 11 additions & 7 deletions sonar-project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,19 @@ sonar.projectKey=fga-eps-mds_2023-2-GEROcuidado-APIForum
sonar.organization=fga-eps-mds-1
sonar.projectName=2023-2-GEROcuidado-APIForum

sonar.sources=src

sonar.host.url=https://sonarcloud.io
sonar.language=ts
sonar.typescript.tsconfigPath=./tsconfig.json

sonar.test.inclusions=**/*.spec.tsx,**/*.spec.ts, **/*.test.ts
sonar.exclusions=node_modules/**,**/main.ts,**/ormconfig.ts,**/*.module.ts,src/migration/*.ts,src/migrations.ts
sonar.sourceEncoding=UTF-8
sonar.python.version=3

sonar.sources=src
sonar.exclusions=**/main.ts,**/ormconfig.ts,**/*.module.ts,src/migration/*.ts,src/migrations.ts

sonar.javascript.lcov.reportPaths=./coverage/unit/lcov.info
sonar.javascript.lcov.reportPaths=coverage/unit/lcov.info

sonar.tests=src
sonar.test.inclusions=**/*.spec.ts
sonar.testExecutionReportPaths=reports/sonar-report.xml



0 comments on commit 39eab8c

Please sign in to comment.