From 64bd9d1e14c071e53668c08f4ce56710b1f083a8 Mon Sep 17 00:00:00 2001 From: KevinMidboe Date: Thu, 22 Mar 2018 15:09:59 +0100 Subject: [PATCH] Added support for travis upload test coverage to coveralls. --- .travis.yml | 3 ++- seasoned_api/package.json | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index db5320c..f9d3297 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,7 +3,8 @@ node_js: '8.7.0' git: submodules: true script: - yarn test + - yarn test + - yarn doc before_install: - cd seasoned_api before_script: yarn diff --git a/seasoned_api/package.json b/seasoned_api/package.json index 48f08f6..1cb0b46 100644 --- a/seasoned_api/package.json +++ b/seasoned_api/package.json @@ -9,6 +9,7 @@ "scripts": { "start": "cross-env SEASONED_CONFIG=conf/development.json NODE_PATH=. node src/webserver/server.js", "test": "cross-env SEASONED_CONFIG=conf/test.json NODE_PATH=. mocha --recursive test", + "cov": "cross-env SEASONED_CONFIG=conf/test.json NODE_PATH=. nyc mocha --recursive test && nyc report --reporter=text-lcov | coveralls", "coverage": "cross-env SEASONED_CONFIG=conf/test.json NODE_PATH=. istanbul cover -x script/autogenerate-documentation.js --include-all-sources --dir test/.coverage node_modules/mocha/bin/_mocha --recursive test/**/* -- --report lcovonly && cat test/.coverage/lcov.info | coveralls && rm -rf test/.coverage", "lint": "./node_modules/.bin/eslint src/" }, @@ -28,12 +29,14 @@ "sqlite3": "4.0.0" }, "devDependencies": { + "coveralls": "^3.0.0", "eslint": "^4.9.0", "eslint-config-airbnb-base": "^12.1.0", "eslint-plugin-import": "^2.8.0", "istanbul": "^0.4.5", "mocha": "^5.0.4", "mocha-lcov-reporter": "^1.3.0", + "nyc": "^11.6.0", "raven": "^2.4.2", "supertest": "^3.0.0", "supertest-as-promised": "^4.0.1"