Skip to content

Instantly share code, notes, and snippets.

@xpepermint
Created October 4, 2018 08:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xpepermint/34c1815c2c0eae7aebed58941b16094e to your computer and use it in GitHub Desktop.
Save xpepermint/34c1815c2c0eae7aebed58941b16094e to your computer and use it in GitHub Desktop.
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