language: node_js node_js: - "10" services: mongodb cache: directories: - node_modules before_script: - sleep 15 - mongo mydb_test --eval 'db.createUser({user:"travis",pwd:"test",roles:["readWrite"]});' install: - npm install -g codecov - npm install -g istanbul@^1.0.0-alpha.2 jobs: include: - stage: "Coverage" script: - npm install - istanbul cover ./node_modules/mocha/bin/_mocha --reporter test -- -R spec - codecov if: branch = master - stage: "Testing" script: npm test if: branch = master