2016-08-25 7 views
0

私はcodegov.ioのpackage.jsonファイルにdevdependiesを設定し、同じファイルにスクリプトを作成しました。私はコードカバレッジ自体のためにイスタンブールを使用しています。 さらに、Travis.ymlも更新しました。トラビスはうまく走っており、ビルドとテストは終わっています。 私はCodecovでユーザーアカウントを持っていますが、私のgit repoにはCodecovのカバレッジレポートは表示されません。codecov.ioのコードカバレッジ

{ 
    "name": "canis-familiaris", 
    "version": "0.0.0-semantically-released", 
    "description": "Dog breeds", 
    "main": "src/index.js", 
    "scripts": { 
    "commit": "git-cz", 
    "check-coverage": "istanbul check-coverage --statements 100 --branches 100 --functions 100 --lines 100", 
    "report-coverage": "cat ./coverage/lcov.info | codecov", 
    "test": "mocha src/index.test.js -w", 
    "test-single": "istanbul cover -x *.test.js _mocha -- -R spec src/index.test.js", 
    "semantic-release": "semantic-release pre && npm publish && semantic-release post" 
    }, 
    "repository": { 
    "type": "git", 
    "url": "https://github.com/mig-25/Canis-familiaris.git" 
    }, 
    "keywords": [ 
    "Dogs", 
    "Breed" 
    ], 
    "author": "Sohail Hasware <[email protected]>", 
    "license": "MIT", 
    "bugs": { 
    "url": "https://github.com/mig-25/Canis-familiaris/issues" 
    }, 
    "homepage": "https://github.com/mig-25/Canis-familiaris#readme", 
    "dependencies": { 
    "unique-random-array": "1.0.0" 
    }, 
    "devDependencies": { 
    "chai": "3.5.0", 
    "codecov.io": "0.1.6", 
    "commitizen": "2.8.6", 
    "cz-conventional-changelog": "1.2.0", 
    "ghooks": "1.3.2", 
    "istanbul": "0.4.5", 
    "mocha": "3.0.2", 
    "semantic-release": "^4.3.5" 
    }, 
    "czConfig": { 
    "path": "node_modules/cz-conventional-changelog" 
    }, 
    "config": { 
    "ghooks": { 
     "pre-commit": "npm run test-single && npm run check-coverage" 
    } 
    } 
} 

そして、これが私のトラヴィスです:

sudo: false 
language: node_js 
cache: 
    directories: 
    - node_modules 
notifications: 
    email: false 
node_js: 
    - 'iojs' 
before_install: 
    - npm i -g [email protected]^2.0.0 
before_script: 
    - npm prune 
script: 
    - npm run test-single 
    - npm run check-coverage 
after_success: 
    - npm report-coverage 
    - npm run semantic-release 
branches: 
    except: 
    - /^v\d+\.\d+\.\d+$/ 

誰も私がここで行方不明です何を教えてもらえますか?

Breds、 Sohail

+0

お試しください〜npm report-coverage〜 'npm run report-coverage'ありがとうございます! –

答えて

0

を求めていただきありがとうございます。 .travis.ymlにカバレッジが実行されないようにするための構文上の問題があると思います。

- npm report-coverage + npm run report-coverage

Codecovサポートチームがお手伝いさせていただきます。 https://codecov.io/support

+0

ありがとう、それは働いた:) – user2371684

関連する問題