codecov / codecov-node

Global coverage report uploader for Codecov in NodeJS
https://codecov.io
MIT License
293 stars 114 forks source link

Jest coverage - help #11

Closed seeliang closed 8 years ago

seeliang commented 8 years ago

Hi all,

I am using Jest for testing

my codecov set

// in package.json
...
"scripts": {
 "test": "jest"
...
// .tavis.yml
language: node_js
node_js:
- stable
cache:
  directories:
  - node_modules
after_success:
  - ./bin/codecov -e TRAVIS_NODE_VERSION

i could not tigger codecov


cache.1
Setting up build cache
$ export CASHER_DIR=$HOME/.casher
0.05s$ Installing caching utilities
0.00s
0.98sattempting to download cache archive
fetching codecov/cache--node-stable.tgz
fetching codecov/cache--node-stable.tbz
fetching master/cache--node-stable.tgz
found cache
0.00s
1.83sadding /home/travis/build/seeliang/react-range-selector/node_modules to cache
$ node --version
v5.8.0
$ npm --version
3.7.3
$ nvm --version
0.23.3
install
11.01s$ npm install 
npm WARN deprecated graceful-fs@1.2.3: graceful-fs version 3 and before will fail on newer node releases. Please update to graceful-fs@^4.0.0 as soon as possible.
> execSync@1.0.2 install /home/travis/build/seeliang/react-range-selector/node_modules/execSync
> node install.js
[execsync v1.0.2] Attempting to compile native extensions.
[execSync v1.0.2]
    Native code compile failed!!
react-two-points-range-selector@0.2.1 /home/travis/build/seeliang/react-range-selector
└─┬ codecov@1.0.1 
  ├── argv@0.0.2 
  ├─┬ execSync@1.0.2 
  │ └─┬ temp@0.5.1 
  │   └─┬ rimraf@2.1.4 
  │     └── graceful-fs@1.2.3 
  └── urlgrey@0.4.1 
npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.0.11
3.91s$ npm test
> react-two-points-range-selector@0.2.1 test /home/travis/build/seeliang/react-range-selector
> jest
Using Jest CLI v0.10.0, jasmine2, babel-jest
 PASS  assets/js/__tests__/input-checkbox__test.js (0.865s)
1 test passed (1 total in 1 test suite, run time 1.837s)
The command "npm test" exited with 0.
cache.2
store build cache
0.00s
5.05schange detected:
/home/travis/build/seeliang/react-range-selector/node_modules/argv/build/full.sh
/home/travis/build/seeliang/react-range-selector/node_modules/argv/build/lint.js
/home/travis/build/seeliang/react-range-selector/node_modules/argv/build/test.js
/home/travis/build/seeliang/react-range-selector/node_modules/argv/CHANGELOG.md
/home/travis/build/seeliang/react-range-selector/node_modules/argv/index.js
/home/travis/build/seeliang/react-range-selector/node_modules/argv/lib/argv.js
/home/travis/build/seeliang/react-range-selector/node_modules/argv/LICENSE
/home/travis/build/seeliang/react-range-selector/node_modules/argv/Makefile
/home/travis/build/seeliang/react-range-selector/node_modules/argv/.nodelint.json
/home/travis/build/seeliang/react-range-selector/node_modules/argv/.npmignore
/home/travis/build/seeliang/react-range-selector/node_modules/argv/package.json
/home/travis/build/seeliang/react-range-selector/node_modules/argv/README.md
/home/travis/build/seeliang/react-range-selector/node_m
...
changes detected, packing new archive
uploading archive
after_success
0.00s$ ./bin/codecov -e TRAVIS_NODE_VERSION
/home/travis/build.sh: line 45: ./bin/codecov: No such file or directory
Done. Your build exited with 0.

many thanks

stevepeak commented 8 years ago

/home/travis/build.sh: line 45: ./bin/codecov: No such file or directory

Have you installed codecov? npm install -g codecov


Or you can change your yaml to:

after_success:
  - bash <(curl -s https://codecov.io/bash) -e TRAVIS_NODE_VERSION
seeliang commented 8 years ago

thanks, the after_success part did it !