Node.js Lerna Travis CI CodeCov报告扫描错误

时间:2017-09-16 11:30:45

标签: javascript code-coverage travis-ci lerna codecov

我们有一个Node.js开源存储库,使用Travis进行单元测试,代码覆盖(使用CodeCov)等。我们刚刚为Lernajs的应用程序采用了monorepo方法,并尝试修改travis.yml文件为:

language: node_js
node_js:
   - "6"
before_install:
  - sudo apt-key adv --keyserver pgp.mit.edu --recv D101F7899D41F3C3
  - echo "deb http://dl.yarnpkg.com/debian/ stable main" | sudo tee 
    /etc/apt/sources.list.d/yarn.list
  - sudo apt-get update -qq
  - sudo apt-get install -y -qq yarn
  - yarn && lerna bootstrap --concurrency=1
  - npm install -g codecov
cache:
 directories:
  - $HOME/.yarn-cache
jobs:
  include:
    - stage: ES Lint & Flow
  script: lerna run lint && lerna run flow
    - stage: Unit Tests
  script: lerna test && lerna install -g codecov && lerna run coverage

我们使用before_install为Lerna和Yarn准备Travis代理。这些阶段工作正常,但问题是它没有将报告上传到显示错误的codecov:

[error] "2017-09-16T10:57:52.285Z"  { ValidationError: "value" is not allowed to be empty
at Object.exports.process (/home/travis/build/BlueEastCode/bluerain-os/packages/bluerain-os/node_modules/joi/lib/errors.js:140:17)
at internals.Any._validateWithOptions (/home/travis/build/BlueEastCode/bluerain-os/packages/bluerain-os/node_modules/joi/lib/any.js:654:25)
at root.validate (/home/travis/build/BlueEastCode/bluerain-os/packages/bluerain-os/node_modules/joi/lib/index.js:100:23)
at /home/travis/build/BlueEastCode/bluerain-os/packages/bluerain-os/node_modules/codacy-coverage/lib/impl/lcov.js:11:37
at tryCatcher (/home/travis/build/BlueEastCode/bluerain-os/packages/bluerain-os/node_modules/bluebird/js/main/util.js:26:23)
at Promise._resolveFromResolver (/home/travis/build/BlueEastCode/bluerain-os/packages/bluerain-os/node_modules/bluebird/js/main/promise.js:483:31)
at new Promise (/home/travis/build/BlueEastCode/bluerain-os/packages/bluerain-os/node_modules/bluebird/js/main/promise.js:71:37)
at Object.parseLcov [as parse] (/home/travis/build/BlueEastCode/bluerain-os/packages/bluerain-os/node_modules/codacy-coverage/lib/impl/lcov.js:9:20)
at Object.module.exports [as handleInput] (/home/travis/build/BlueEastCode/bluerain-os/packages/bluerain-os/node_modules/codacy-coverage/lib/handleInput.js:26:54)
at Socket.<anonymous> (/home/travis/build/BlueEastCode/bluerain-os/packages/bluerain-os/node_modules/codacy-coverage/bin/codacy-coverage.js:45:20)
at emitNone (events.js:91:20)
at Socket.emit (events.js:185:7)
at endReadableNT (_stream_readable.js:974:12)
at _combinedTickCallback (internal/process/next_tick.js:80:11)
at process._tickCallback (internal/process/next_tick.js:104:9)

任何人都对这个问题有任何想法?我们希望解决这个问题,保持Lerna。

0 个答案:

没有答案