Skip to content

Commit

Permalink
🐛 adding_new_configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
DaviMatheus committed Oct 27, 2023
1 parent 850cf80 commit 4918a77
Show file tree
Hide file tree
Showing 5 changed files with 138 additions and 29 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/code-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
branches:
- main
pull_request:
# types: [opened, synchronize, reopened]
branches:
- main

Expand All @@ -14,7 +15,7 @@ jobs:
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
fetch-depth: 0

- name: Instala dependências
run: yarn
Expand All @@ -23,7 +24,7 @@ jobs:
run: yarn lint

- name: Executa testes e gera cobertura
run: yarn test
run: yarn test:all

- name: Executa SonarCloud Scan
if: ${{ always() }}
Expand All @@ -39,4 +40,4 @@ jobs:
fail_ci_if_error: true
flags: jest
name: 2023.2-PrintGo-FrontEnd
verbose: true
verbose: true
65 changes: 65 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

40 changes: 19 additions & 21 deletions scripts/metrics.js
Original file line number Diff line number Diff line change
@@ -1,28 +1,26 @@
const REPO = '2023.2-PrintGo-FrontEnd'
const SONAR_OWNER = 'fga-eps-mds-1'
const OWNER = 'fga-eps-mds'
const SONAR_ID = 'fga-eps-mds_2023.2-PrintGo-FrontEnd'

const METRIC_LIST = [
'files',
'functions',
'complexity',
'comment_lines_density',
'duplicated_lines_density',
'coverage',
'ncloc',
'tests',
'test_errors',
'test_failures',
'test_execution_time',
'security_rating'
]
const SONAR_URL = `https://sonarcloud.io/api/measures/component_tree?component=${SONAR_ID}&metricKeys=${METRIC_LIST.join(
','
)}&ps=500`
'files',
'functions',
'complexity',
'comment_lines_density',
'duplicated_lines_density',
'coverage',
'ncloc',
'tests',
'test_errors',
'test_failures',
'test_execution_time',
'security_rating'
];

const SONAR_URL = `https://sonarcloud.io/api/measures/component_tree?component=${SONAR_ID}&metricKeys=${METRIC_LIST.join(',')}&ps=500`;

module.exports = {
SONAR_URL,
REPO,
OWNER
}
SONAR_URL,
REPO,
OWNER
};
12 changes: 10 additions & 2 deletions sonar-project.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
sonar.projectKey=fga-eps-mds_2023.2-PrintGo-FrontEnd
sonar.organization=fga-eps-mds-1
sonar.sources=src
sonar.exclusions=node_modules/**, test/**, assets/**, .github/**
sonar.javascript.lcov.reportPaths=coverage/lcov.info
sonar.tests=tests
sonar.language=ts
sonar.typescript.tsconfigPath=./tsconfig.json

sonar.test.inclusions=**/*.spec.tsx,**/*.spec.ts, **/*.test.ts
sonar.exclusions=node_modules/**, test/**, assets/**, .github/**, scripts/**


sonar.javascript.lcov.reportPaths=coverage/lcov.info
sonar.testExecutionReportPaths=reports/sonar-report.xml
43 changes: 40 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4213,6 +4213,11 @@ entities@^4.4.0:
resolved "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz"
integrity sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==

[email protected]:
version "4.3.0"
resolved "https://registry.npmjs.org/entities/-/entities-4.3.0.tgz"
integrity sha512-/iP1rZrSEJ0DTlPiX+jbzlA3eVkY/e8L8SozroF395fIqE3TYF/Nz7YOMAawta+vLmyJ/hkGNNPcSbMADCCXbg==

error-ex@^1.3.1:
version "1.3.2"
resolved "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz"
Expand Down Expand Up @@ -6131,6 +6136,13 @@ jest-message-util@^29.7.0:
slash "^3.0.0"
stack-utils "^2.0.3"

jest-mock-extended@^3.0.5:
version "3.0.5"
resolved "https://registry.npmjs.org/jest-mock-extended/-/jest-mock-extended-3.0.5.tgz"
integrity sha512-/eHdaNPUAXe7f65gHH5urc8SbRVWjYxBqmCgax2uqOBJy8UUcCBMN1upj1eZ8y/i+IqpyEm4Kq0VKss/GCCTdw==
dependencies:
ts-essentials "^7.0.3"

jest-mock@^27.5.1:
version "27.5.1"
resolved "https://registry.npmjs.org/jest-mock/-/jest-mock-27.5.1.tgz"
Expand Down Expand Up @@ -6275,6 +6287,21 @@ jest-snapshot@^27.5.1:
pretty-format "^27.5.1"
semver "^7.3.2"

jest-sonar-reporter@^2.0.0:
version "2.0.0"
resolved "https://registry.npmjs.org/jest-sonar-reporter/-/jest-sonar-reporter-2.0.0.tgz"
integrity sha512-ZervDCgEX5gdUbdtWsjdipLN3bKJwpxbvhkYNXTAYvAckCihobSLr9OT/IuyNIRT1EZMDDwR6DroWtrq+IL64w==
dependencies:
xml "^1.0.1"

jest-sonar@^0.2.16:
version "0.2.16"
resolved "https://registry.npmjs.org/jest-sonar/-/jest-sonar-0.2.16.tgz"
integrity sha512-ES6Z9BbIVDELtbz+/b6pv41B2qOfp38cQpoCLqei21FtlkG/GzhyQ0M3egEIM+erpJOkpRKM8Tc8/YQtHdiTXA==
dependencies:
entities "4.3.0"
strip-ansi "6.0.1"

jest-util@^27.5.1:
version "27.5.1"
resolved "https://registry.npmjs.org/jest-util/-/jest-util-27.5.1.tgz"
Expand Down Expand Up @@ -6400,7 +6427,7 @@ jest-worker@^29.7.0:
merge-stream "^2.0.0"
supports-color "^8.0.0"

"jest@^27.0.0 || ^28.0.0", jest@^27.4.3, jest@^27.5.1:
"jest@^24.0.0 || ^25.0.0 || ^26.0.0 || ^27.0.0 || ^28.0.0 || ^29.0.0", "jest@^27.0.0 || ^28.0.0", jest@^27.4.3, jest@^27.5.1:
version "27.5.1"
resolved "https://registry.npmjs.org/jest/-/jest-27.5.1.tgz"
integrity sha512-Yn0mADZB89zTtjkPJEXwrac3LHudkQMR+Paqa8uxJHCBr9agxztUifWCyiYrjhMPBoUVBjyny0I7XH6ozDr7QQ==
Expand Down Expand Up @@ -9014,7 +9041,7 @@ stringify-object@^3.3.0:
is-obj "^1.0.1"
is-regexp "^1.0.0"

strip-ansi@^6.0.0, strip-ansi@^6.0.1:
strip-ansi@^6.0.0, strip-ansi@^6.0.1, [email protected]:
version "6.0.1"
resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz"
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
Expand Down Expand Up @@ -9357,6 +9384,11 @@ tryer@^1.0.1:
resolved "https://registry.npmjs.org/tryer/-/tryer-1.0.1.tgz"
integrity sha512-c3zayb8/kWWpycWYg87P71E1S1ZL6b6IJxfb5fvsUgsf0S2MVGaDhDXXjDMpdCpfWXqptc+4mXwmiy1ypXqRAA==

ts-essentials@^7.0.3:
version "7.0.3"
resolved "https://registry.npmjs.org/ts-essentials/-/ts-essentials-7.0.3.tgz"
integrity sha512-8+gr5+lqO3G84KdiTSMRLtuyJ+nTBVRKuCrK4lidMPdVeEp0uqC875uE5NMcaA7YYMN7XsNiFQuMvasF8HT/xQ==

ts-interface-checker@^0.1.9:
version "0.1.13"
resolved "https://registry.npmjs.org/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz"
Expand Down Expand Up @@ -9482,7 +9514,7 @@ typedarray-to-buffer@^3.1.5:
dependencies:
is-typedarray "^1.0.0"

"typescript@^3.2.1 || ^4", "typescript@>= 2.7", "typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta":
"typescript@^3.0.0 || ^4.0.0 || ^5.0.0", "typescript@^3.2.1 || ^4", "typescript@>= 2.7", "typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta", typescript@>=3.7.0:
version "4.9.5"
resolved "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz"
integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==
Expand Down Expand Up @@ -10162,6 +10194,11 @@ xml-name-validator@^4.0.0:
resolved "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-4.0.0.tgz"
integrity sha512-ICP2e+jsHvAj2E2lIHxa5tjXRlKDJo4IdvPvCXbXQGdzSfmSpNVyIKMvoZHjDY9DP0zV17iI85o90vRFXNccRw==

xml@^1.0.1:
version "1.0.1"
resolved "https://registry.npmjs.org/xml/-/xml-1.0.1.tgz"
integrity sha512-huCv9IH9Tcf95zuYCsQraZtWnJvBtLVE0QHMOs8bWyZAFZNDcYjsPq1nEx8jKA9y+Beo9v+7OBPRisQTjinQMw==

xmlchars@^2.2.0:
version "2.2.0"
resolved "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz"
Expand Down

0 comments on commit 4918a77

Please sign in to comment.