diff --git a/.sonarcloud.properties b/.sonarcloud.properties new file mode 100644 index 0000000..c61290b --- /dev/null +++ b/.sonarcloud.properties @@ -0,0 +1,8 @@ +sonar.organization=sartography +sonar.projectKey=sartography-workflow-lib +sonar.host.url=https://sonarcloud.io +sonar.login=f586bac67c1fe26a18700fa0ecf535e9c8a49bee +sonar.javascript.lcov.reportPaths=projects/sartography-workflow-lib/coverage/sartography-workflow-lib/lcov.info +sonar.typescript.tsconfigPath=tsconfig.json +sonar.coverage.exclusions=**/*.mocks.ts, **/*.spec.ts, e2e/**, projects/sartography-workflow-lib/src/public-api.ts, projects/sartography-workflow-lib/src/test.ts, karma.conf.js +sonar.cpd.exclusions=**/*.mocks.ts, **/*.spec.ts, e2e/**, projects/sartography-workflow-lib/src/public-api.ts, projects/sartography-workflow-lib/src/test.ts, karma.conf.js diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..c54707e --- /dev/null +++ b/.travis.yml @@ -0,0 +1,16 @@ +sudo: required +dist: trusty +addons: + chrome: stable + sonarcloud: + organization: "sartography" +language: node_js +node_js: + - 12 +before_script: + - export DISPLAY=:99.0 + - sh -e /etc/init.d/xvfb start +install: + - npm install +script: + - npm run ci diff --git a/package.json b/package.json index 09309f6..a8f38c8 100644 --- a/package.json +++ b/package.json @@ -6,11 +6,13 @@ "start": "ng serve", "build": "ng build", "test": "ng test", + "test:coverage": "ng test --codeCoverage=true --watch=false --browsers=ChromeHeadless", "lint": "ng lint", "e2e": "ng e2e", "patch-version": "cd projects/sartography-workflow-lib && npm version patch && cd ../..", "republish": "ng build sartography-workflow-lib && cd dist/sartography-workflow-lib && npm publish && cd ../..", - "bump": "npm run patch-version && npm run republish" + "bump": "npm run patch-version && npm run republish", + "ci": "npm run lint && npm run test:coverage && npm run build" }, "private": true, "dependencies": { diff --git a/sonar-project.properties b/sonar-project.properties new file mode 120000 index 0000000..56b26ee --- /dev/null +++ b/sonar-project.properties @@ -0,0 +1 @@ +.sonarcloud.properties \ No newline at end of file