Skip to content

Commit

Permalink
Merge pull request #335 from basics/feature/sonarcloud
Browse files Browse the repository at this point in the history
chore(sonarcloud): added code coverage
  • Loading branch information
StephanGerbeth authored Dec 19, 2021
2 parents c5774bc + a2594b3 commit 28f9189
Show file tree
Hide file tree
Showing 6 changed files with 388 additions and 6 deletions.
20 changes: 20 additions & 0 deletions .c8rc
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"all": true,
"reporter": [
"text",
"lcov",
"cobertura"
],
"include": [
"test/**/*.js"
],
"extension": [
".js"
],
"exclude": [

],
"sourceMap": true,
"instrument": true,
"exclude-after-remap": false
}
7 changes: 7 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,13 @@
"semi": [
2,
"always"
],
"no-multiple-empty-lines": [
"error",
{
"max": 1,
"maxBOF": 1
}
]
}
}
4 changes: 4 additions & 0 deletions .github/workflows/sonarcloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ jobs:
- name: Lint (Report Generate)
run: npm run lint:report

- name: Coverage (Report Generate)
run: npm run test:coverage

- name: get-npm-version
id: package-version
uses: martinbeentjes/npm-get-version-action@master
Expand All @@ -54,6 +57,7 @@ jobs:
-Dsonar.organization=basics
-Dsonar.projectKey=basics_vector
-Dsonar.eslint.reportPaths=eslint-report.json
-Dsonar.javascript.lcov.reportPaths=./coverage/lcov.info
-Dsonar.projectVersion=${{ steps.package-version.outputs.current-version}}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
Loading

0 comments on commit 28f9189

Please sign in to comment.