Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Codecov setup
---
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
{
"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