不要怂,就是干,撸起袖子干!

Commit 44885d7e by Ben Evans

Code Coverage and Coveralls.io

1 parent ad2661d0
Showing with 33 additions and 1 deletions
......@@ -7,3 +7,4 @@ npm-debug.log
*~
test/binary/tmp/*
test/tmp/*
coverage-mysql
......@@ -18,6 +18,10 @@ test:
make teaser && ./node_modules/mocha/bin/mocha --check-leaks --colors -t 10000 --reporter $(REPORTER) $(TESTS); \
fi
cover:
rm -rf coverage \
make teaser && ./node_modules/.bin/istanbul cover ./node_modules/.bin/_mocha -- -- -u exports --report lcovonly -- -R spec -- $(TESTS); \
mv coverage coverage-$(DIALECT) \
mariadb:
@DIALECT=mariadb make test
......@@ -32,6 +36,27 @@ postgres-native:
binary:
@./test/binary/sequelize.test.bats
mariadb-cover:
@DIALECT=mariadb make cover
sqlite-cover:
@DIALECT=sqlite make cover
mysql-cover:
@DIALECT=mysql make cover
postgres-cover:
@DIALECT=postgres make cover
postgres-native-cover:
@DIALECT=postgres-native make cover
binary-cover:
@./test/binary/sequelize.test.bats
merge-coverage:
rm -rf coverage
mkdir coverage
./node_modules/.bin/lcov-result-merger 'coverage-*/lcov.info' 'coverage/lcov.info'
coveralls-send:
cat ./coverage/lcov.info | ./node_modules/.bin/coveralls && rm -rf ./coverage
# test aliases
pgsql: postgres
......@@ -41,4 +66,7 @@ postgresn: postgres-native
all: sqlite mysql postgres postgres-native mariadb
all-cover: sqlite-cover mysql-cover postgres-cover postgres-native-cover mariadb-cover merge-coverage
coveralls: sqlite-cover mysql-cover postgres-cover postgres-native-cover mariadb-cover merge-coverage coveralls-send
.PHONY: sqlite mysql postgres pgsql postgres-native postgresn all test
......@@ -58,7 +58,10 @@
"mocha": "~1.13.0",
"chai-datetime": "~1.1.1",
"sinon": "~1.7.3",
"mariasql": "git://github.com/sequelize/node-mariasql.git"
"mariasql": "git://github.com/sequelize/node-mariasql.git",
"lcov-result-merger": "0.0.2",
"istanbul": "~0.1.45",
"coveralls": "~2.5.0"
},
"keywords": [
"mysql",
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!