Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable coverage via nyc #345

Merged
merged 1 commit into from
Jul 18, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
test/actual
actual
coverage
.nyc_output

# npm
node_modules
Expand Down
12 changes: 6 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
sudo: false
language: node_js
node_js:
- node
- 'node'
- '12'
- '10'
- '8'
- '6'
- '0.10'
- '0.12'
- 4
- 6
script: make test-ci
script: yarn test-ci
after_success: yarn coverage
7 changes: 0 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,6 @@ test: lint
echo "CommonMark stat:\n"
./support/specsplit.js test/fixtures/commonmark/spec.txt

coverage:
rm -rf coverage
istanbul cover node_modules/.bin/_mocha

test-ci: lint
istanbul cover ./node_modules/mocha/bin/_mocha --report lcovonly -- -R spec && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./coverage

gh-pages:
if [ "git branch --list gh-pages" ]; then \
git branch -D gh-pages ; \
Expand Down
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@
"node": ">= 0.10.0"
},
"scripts": {
"test": "make test"
"test": "make test",
"test-ci": "nyc mocha -R spec --bail",
"coverage": "yarn add coveralls@2 && nyc report --reporter=text-lcov | coveralls"
},
"dependencies": {
"argparse": "~0.1.15",
Expand All @@ -68,7 +70,8 @@
"gulp-format-md": "^0.1.10",
"highlight.js": "^9.7.0",
"marked": "0.3.2",
"mocha": "*"
"mocha": "^6.1.4",
"nyc": "^14.1.1"
},
"keywords": [
"commonmark",
Expand Down