From 28b94034547034750dcb9d829efd76e64a6926ff Mon Sep 17 00:00:00 2001 From: Neil Kalman Date: Sun, 9 Dec 2018 11:25:20 +0200 Subject: [PATCH 1/3] ci(travis-ci): change filename as suggested in issue https://github.com/travis-ci/travis-ci/issues/9825 --- travis.yml => .travis.yml | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename travis.yml => .travis.yml (100%) diff --git a/travis.yml b/.travis.yml similarity index 100% rename from travis.yml rename to .travis.yml From 2548d392aee2a46d757a48b34d431403670bab40 Mon Sep 17 00:00:00 2001 From: Neil Kalman Date: Sun, 9 Dec 2018 12:15:57 +0200 Subject: [PATCH 2/3] ci(travis): deploy coverage and semantic release on travis --- .gitignore | 1 + .travis.yml | 11 ++++++++++- package.json | 30 +++++++++++++++++++++++++++--- 3 files changed, 38 insertions(+), 4 deletions(-) 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" + } + ] + ] } } From fcfc47931cf6044904e8948a09828a9ba67863b7 Mon Sep 17 00:00:00 2001 From: Neil Kalman Date: Sun, 9 Dec 2018 12:17:09 +0200 Subject: [PATCH 3/3] build: make sure commitizen uses the correct version + add mac generated file to .gitignore --- .gitignore | 3 ++- package.json | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index b68587e..4fc038f 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,5 @@ node_modules/ .env* package-lock.json .idea -test-results/ \ No newline at end of file +test-results/ +.DS_store \ No newline at end of file diff --git a/package.json b/package.json index e7a9441..56ee277 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "devDependencies": { "@commitlint/cli": "^7.2.1", "@commitlint/config-angular": "^7.1.2", - "commitizen": "3.0.4", + "commitizen": "3.0.0", "coveralls": "^3.0.2", "eslint": "^5.10.0", "husky": "^1.2.0",