Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: integrate with SonarCloud #672

Merged
merged 8 commits into from
May 3, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .nycrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"exclude": [
"lib/rest/**/*.js",
"**/*.spec.js"
],
"reporter": [
"lcovonly",
"text"
]
}
15 changes: 13 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,18 @@ language: node_js
node_js:
- node
- lts/*
- '10'
- '8'
- '6'
services:
- docker
script: npm run ci
jobs:
include:
- language: node_js
node_js: '10'
after_success:
- sonar-scanner
script:
- npm run ci
deploy:
- provider: script
script: make docker-build && make docker-push
Expand All @@ -29,3 +35,8 @@ notifications:
on_failure: change
rooms:
secure: hhVGtw3ogUdCazgfsy5fh0BnCrgQJuZ56mRmRv9fqv7JYJRktf73HT7ZtyxqWW0zYuzfxPcLeEHhU02CKNfYVuaJMtukDQT40LBKIudsTOGJllulYXmM2VJYm2NChalwcx9JPx7Sxy5dBkz+AMrXlX7fmw4943e+fbve+tivj90=
addons:
sonarcloud:
organization: twilio
token:
secure: nCBPvVz97nV1YyOxwyHtgkWBXpICTVGk5XzMBoml2fp1EY8UP2tdik8IbhwFnFv5jyrxWSfo7hoGMciQZu65cIFl1S+3DjI0G3oyPdBkfi8kgRlt4cThK/saiJYHlFee96rvVMvcvpWX4s0XcKww8WjKVSkhvhAZ8d2NoZz+bxw=
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
"mock-fs": "^4.12.0",
"nock": "^10.0.6",
"node-mocks-http": "^1.8.1",
"nyc": "^15.1.0",
"proxyquire": "^2.1.3",
"typescript": "^2.8.3"
},
Expand All @@ -55,9 +56,11 @@
"jshint": "jshint lib/rest/** lib/base/** lib/http/**",
"jscs": "eslint lib/base/**/**.js lib/http/**/**.js --fix",
"check": "npm run jshint && npm run jscs",
"ci": "npm test && npm run nsp",
"ci": "npm run nyc && npm run nsp",
"coverage": "nyc npm test",
"jsdoc": "jsdoc -r lib -d docs",
"nsp": "if [ `npm --version | cut -d'.' -f1` -ge \"6\" ]; then npm audit; else echo \"npm audit is not available for npm < 6.0\"; fi"
"nsp": "if [ `npm --version | cut -d'.' -f1` -ge \"6\" ]; then npm audit; else echo \"npm audit is not available for npm < 6.0\"; fi",
"nyc": "if [ `node --version | cut -d'.' -f1 | cut -c2-` -ge \"8\" ]; then npm run coverage; else npm test; fi"
},
"files": [
"lib",
Expand Down
12 changes: 12 additions & 0 deletions sonar-project.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
sonar.projectKey=twilio_twilio-node
sonar.projectName=twilio-node
sonar.organization=twilio

sonar.sources=lib/
sonar.exclusions=lib/rest/**/*
sonar.tests=spec/
sonar.test.exclusions=spec/integration/**/*.spec.js

# For Code Coverage analysis
sonar.javascript.lcov.reportPaths=coverage/lcov.info
sonar.coverage.exclusions=lib/rest/**/*