Skip to content

Commit

Permalink
adjust build setup
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed Jun 13, 2016
1 parent 8785b79 commit d1a5298
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 6 deletions.
2 changes: 1 addition & 1 deletion build/karma.cover.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ var base = require('./karma.base.config.js')
module.exports = function (config) {
var options = Object.assign(base, {
browsers: ['PhantomJS'],
reporters: ['progress', 'coverage'],
reporters: ['mocha', 'coverage'],
coverageReporter: {
reporters: [
{ type: 'lcov', dir: '../coverage', subdir: '.' },
Expand Down
4 changes: 3 additions & 1 deletion build/karma.sauce.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,9 @@ module.exports = function (config) {
singleRun: true,
browsers: Object.keys(batch),
customLaunchers: batch,
reporters: ['progress', 'saucelabs'],
reporters: process.env.CI
? ['dots', 'saucelabs'] // avoid spamming CI output
: ['progress', 'saucelabs'],
sauceLabs: {
testName: 'Vue.js unit tests',
recordScreenshots: false,
Expand Down
7 changes: 6 additions & 1 deletion build/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,12 @@ if [[ $REPLY =~ ^[Yy]$ ]]
then
echo "Releasing $VERSION ..."

npm test 2>/dev/null
npm run lint
npm run flow
npm run test:cover
npm run test:e2e
npm run test:ssr
npm run test:sauce

# build
VERSION=$VERSION npm run build
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"dev:compiler": "webpack --watch --config build/webpack.compiler.dev.config.js",
"build": "NODE_ENV=production node build/build.js",
"build:ssr": "npm run build -- vue.common.js,vue-template-compiler,vue-server-renderer",
"test": "npm run lint && flow check && npm run test:cover && npm run test:unit && npm run test:e2e && npm run test:ssr",
"test": "npm run lint && flow check && npm run test:cover && npm run test:e2e -- --env phantomjs && npm run test:ssr",
"test:unit": "NODE_ENV=development karma start build/karma.unit.config.js",
"test:cover": "NODE_ENV=development karma start build/karma.cover.config.js",
"test:e2e": "npm run build -- vue.js && node test/e2e/runner.js",
Expand Down Expand Up @@ -67,11 +67,11 @@
"karma-coverage": "^1.0.0",
"karma-firefox-launcher": "^1.0.0",
"karma-jasmine": "^1.0.2",
"karma-mocha-reporter": "^2.0.4",
"karma-phantomjs-launcher": "^1.0.0",
"karma-safari-launcher": "^1.0.0",
"karma-sauce-launcher": "^1.0.0",
"karma-sourcemap-loader": "^0.3.0",
"karma-spec-reporter": "^0.0.26",
"karma-webpack": "^1.7.0",
"lodash": "^4.13.1",
"nightwatch": "^0.9.0",
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/runner.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ if (args.indexOf('--config') === -1) {
args = args.concat(['--config', 'build/nightwatch.config.js'])
}
if (args.indexOf('--env') === -1) {
args = args.concat(['--env', 'chrome,firefox'])
args = args.concat(['--env', 'chrome,firefox,phantomjs'])
}
var i = args.indexOf('--test')
if (i > -1) {
Expand Down

0 comments on commit d1a5298

Please sign in to comment.