diff --git a/.gitignore b/.gitignore index 76faeb0..b68587e 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ node_modules/ .env* package-lock.json .idea +test-results/ \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index 71156fd..7f33752 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,15 @@ sudo: false language: node_js +cache: + directories: + - ~/.npm node_js: - "8.3" notifications: - disabled: true + email: false +after_success: + - npm run travis-deploy-once "npm run semantic-release" + - npm run coveralls +branches: + except: + - /^v\d+\.\d+\.\d+$/ \ No newline at end of file diff --git a/package.json b/package.json index b76a936..e7a9441 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,10 @@ "lint:fix": "npx eslint --fix ./lib/*.js", "commit": "npx git-cz", "test": "jest", - "test:watch": "jest --watch --notify --notifyMode=change --coverage" + "test:watch": "jest --watch --notify --notifyMode=change --coverage", + "test:cov": "jest --coverage", + "coveralls": "npm run test:cov && cat ./test-results/lcov.info | coveralls", + "travis-deploy-once": "travis-deploy-once" }, "husky": { "hooks": { @@ -41,12 +44,15 @@ "@commitlint/cli": "^7.2.1", "@commitlint/config-angular": "^7.1.2", "commitizen": "3.0.4", + "coveralls": "^3.0.2", "eslint": "^5.10.0", "husky": "^1.2.0", "jest": "^22.4.3", + "jest-html-reporter": "^2.4.2", "nock": "^10.0.0", "nodemon": "^1.17.2", - "smee-client": "^1.0.2" + "smee-client": "^1.0.2", + "travis-deploy-once": "^5.0.9" }, "engines": { "node": ">= 8.3.0" @@ -59,6 +65,24 @@ ] }, "jest": { - "testEnvironment": "node" + "testEnvironment": "node", + "coverageReporters": [ + "json", + "lcov", + "text", + "clover", + "html" + ], + "coverageDirectory": "./test-results", + "reporters": [ + "default", + [ + "jest-html-reporter", + { + "pageTitle": "achievibit's Test Report", + "outputPath": "./test-results/test-report.html" + } + ] + ] } }