纽约工作服整合不工作

nyc coveralls integration not working

我尝试按照说明使 nyccoveralls 一起工作: https://github.com/istanbuljs/nyc#integrating-with-coveralls

但我无法让它工作。这是一个示例回购: https://github.com/unional/showdown-highlightjs-extension

Travis 构建成功:https://travis-ci.org/unional/showdown-highlightjs-extension

Coveralls 注意到构建,但似乎没有获得任何数据: https://coveralls.io/github/unional/showdown-highlightjs-extension

这是我的 .travis.yml:

language: node_js

notifications:
  email:
    on_success: never
    on_failure: change

node_js:
  - "stable"

before_install:
  - npm install -g npm

script:
  - npm run verify

after_script:
  - npm install coveralls && npm run coveralls

这是我的 package.json:

{
  ...
  "scripts": {
    "coverage": "npm test && nyc check-coverage --branches 85 --functions 85 --lines 85",
    "coveralls": "nyc report --reporter=text-lcov | coveralls",
    "test": "npm run clean && tsc && nyc ava"
    ...
  },
  "nyc": {
    "exclude": [
      "scripts",
      "**/*.spec.*",
      "**/fixtures/**/*"
    ]
  },
  ...
}

尝试将您的 Coveralls 存储库 API 令牌(可以在您的存储库的 Coveralls 页面上找到)添加到新的 COVERALLS_REPO_TOKEN encrypted environment variable on Travis, as per the (somewhat sketchy) documentation on the Coveralls site.

我发现问题出在我的 tsconfig.json:

{
  "compilerOptions": {
    "sourceRoot": "/showdown-highlight-extension"
    ...
  }
}

此设置在浏览器中为我提供了正确的(我假设)源映射。参见 What's the proper way to set sourceRoot in typescript?

但覆盖工具不喜欢。

一旦我删除它,它就会开始工作。

需要找到该问题的答案。