Skip to content
This repository was archived by the owner on Jun 27, 2019. It is now read-only.

Commit 90a717a

Browse files
committed
Fix build server
Refactoring the behaviour how to start the backend process. Instead of node's rather unreliable `spawn` let's use shell commands in package.json. Also take `yarn run eslint` out of `yarn run test` and run it separately on travis. If possible, try to separate scripts on Travis for error friendliness. Only for coverage we need to combine the `yarn run cucumber` and `yarn run mocha` in one script `test`.
1 parent c6790d1 commit 90a717a

File tree

3 files changed

+5
-38
lines changed

3 files changed

+5
-38
lines changed

.travis.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ jobs:
2222
- script:
2323
- yarn install --frozen-lockfile --non-interactive
2424
- yarn add codacy-coverage
25-
- NODE_PATH=$(which node) yarn test
25+
- yarn run eslint
26+
- yarn run test:coverage
2627
- cat ./coverage/lcov.info | codacy-coverage
2728

2829
after_success:

features/env/services.js

Lines changed: 0 additions & 35 deletions
This file was deleted.

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@
3434
},
3535
"scripts": {
3636
"clear": "rm -Rf tmp",
37-
"test": "npm run eslint && cross-env NODE_ENV=test && nyc --reporter=lcovonly --reporter=text-summary npm run mocha && npm run cucumber",
37+
"test": "npm run mocha && npm run cucumber",
38+
"test:coverage": "nyc --reporter=lcovonly --reporter=text-summary npm run test",
3839
"test:mongo": "npm run eslint && cross-env NODE_ENV=test && nyc --reporter=lcovonly --reporter=text-summary npm run mocha:mongo",
3940
"eslint": "eslint server/. test/. features/. --config .eslintrc.json",
4041
"start": "concurrently 'mongod' 'wait-on tcp:27017 && cross-env NODE_ENV=production node server/'",
@@ -45,7 +46,7 @@
4546
"dev:win": "npm run clear && concurrently \"mongod --dbpath /data/db\" \"wait-on tcp:27017&&cross-env NODE_ENV=development&&cross-env DEBUG=feathers&& nodemon --inspect server/\"",
4647
"mocha": "npm run clear && $npm_package_config_mocha",
4748
"mocha:mongo": "$npm_package_config_concurrently '$npm_package_config_mongoDev &>/dev/null' 'wait-on tcp:27017 && npm run mocha'",
48-
"cucumber": "cucumber-js"
49+
"cucumber": "npm run clear && concurrently --kill-others --success first 'cross-env NODE_ENV=test node server/' 'wait-on tcp:3030 && cross-env NODE_ENV=test cucumber-js'"
4950
},
5051
"config": {
5152
"mongoDev": "mongod --dbpath data --quiet",

0 commit comments

Comments
 (0)