Skip to content

Commit

Permalink
Add nyc for test coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
RobbieTheWagner committed Aug 1, 2018
1 parent 2635be8 commit 060e961
Show file tree
Hide file tree
Showing 4 changed files with 496 additions and 14 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
/.idea/
/dist/
/.log/
/.nyc_output/
/coverage/
/dist/
/node_modules/
/.DS_Store
/.sass-cache
Expand Down
10 changes: 9 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ node_js:
sudo: false
dist: trusty

addons:
chrome: stable
code_climate:
repo_token:
secure: "Qg05d4W5BfhbxXy9E9M8ACo2ULSs6tGL5We3pTCAH+smnCKKjXv5Bl+Tu7fC6Cup15LchVUGOxJ/RqXRWV3YEnwqYYZohj0EZANKedLfI8efFXlY1aIs6g29DbWzoCVbG8EczcNY7thakYzW37xkua3GdywH2s7l384bjCOsVDw="

cache:
yarn: true

Expand All @@ -17,7 +23,9 @@ jobs:
script:
- yarn lint
- gulp js
- npm test
- yarn test
after_script:
- codeclimate-test-reporter < coverage/lcov.info
- stage: npm release
script:
- yarn build
Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"lint:js": "eslint ./src/js/shepherd.js",
"lint:styles": "stylelint ./src/css/**/*.scss ./docs/welcome/sass/welcome.scss",
"lint": "yarn lint:js && yarn lint:styles",
"test": "mocha"
"test": "nyc --reporter=text --reporter=lcov mocha"
},
"homepage": "http://shipshapecode.github.io/shepherd/docs/welcome/",
"license": "MIT",
Expand All @@ -37,6 +37,7 @@
"devDependencies": {
"@babel/core": "^7.0.0-beta.52",
"@babel/preset-env": "^7.0.0-beta.52",
"codeclimate-test-reporter": "^0.5.0",
"del": "^3.0.0",
"eslint": "^5.1.0",
"eslint-plugin-ship-shape": "^0.6.0",
Expand All @@ -52,6 +53,7 @@
"gulp-uglify-es": "^1.0.4",
"gulp-wrap-umd": "^0.2.1",
"mocha": "^5.2.0",
"nyc": "^12.0.2",
"stylelint": "^9.3.0",
"stylelint-config-ship-shape": "^0.4.0",
"testem": "^2.8.2"
Expand Down
Loading

0 comments on commit 060e961

Please sign in to comment.