Created
October 4, 2018 08:10
-
-
Save xpepermint/34c1815c2c0eae7aebed58941b16094e to your computer and use it in GitHub Desktop.
Codecov setup
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
language: node_js | |
node_js: | |
- 9 | |
- 10 | |
script: | |
# use latest npm to work on node9 | |
- npm install -g npm | |
# codecov | |
- npm install -g codecov | |
# initialization & testing | |
- npm run bootstrap && npm test | |
after_success: | |
# code coverage & codecov upload | |
- rm -Rf .nyc_output && mkdir -p .nyc_output | |
- find packages/**/.nyc_output -type f -name '*.json' -exec cp '{}' .nyc_output \; | |
- npx nyc report --reporter=text-lcov > .nyc_output/coverage.lcov | |
- codecov |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "mypackage", | |
"version": "0.0.0", | |
"description": "", | |
"main": "./dist/index.js", | |
"types": "./dist/index.d.ts", | |
"scripts": { | |
"test": "hayspec test --require ts-node/register --match './src/tests/**/*.test.ts'" | |
}, | |
"nyc": { | |
"extension": [ | |
".ts" | |
], | |
"require": [ | |
"ts-node/register" | |
], | |
"exclude": [ | |
"src/tests" | |
] | |
}, | |
"license": "MIT", | |
"devDependencies": { | |
"@hayspec/cli": "latest", | |
"@hayspec/spec": "latest", | |
"nyc": "^12.0.2", | |
"typescript": "^3.1.1" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment