Skip to content

Commit

Permalink
feature: add unit test in circleci
Browse files Browse the repository at this point in the history
Signed-off-by: Zou Rui <21751189@zju.edu.cn>
  • Loading branch information
ZouRui89 committed Apr 3, 2018
1 parent 46c67ec commit 70f9731
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,17 @@ jobs:
- run:
name: use markdownlint v0.4.0 to lint markdown file (https://github.com/markdownlint/markdownlint)
command: find ./ -name "*.md" | grep -v vendor | grep -v extra | grep -v commandline | grep -v .github | grep -v swagger | grep -v api | xargs mdl -r ~MD013,~MD024,~MD029,~MD033,~MD036
- run:
name: run unit test with coverage
command: |
cd /tmp/pouchbuild/src/github.com/alibaba/pouch
go test -i
for d in `go list ./... | grep -v 'github.com/alibaba/pouch/test' | grep -v 'github.com/alibaba/pouch/extra' | grep -v 'github.com/alibaba/pouch/vendor' `
do
go test -coverprofile=profile.out -covermode=atomic $d
if [ -f profile.out ] ; then
cat profile.out >> coverage.txt
rm profile.out >/dev/null 2>&1
fi
done

0 comments on commit 70f9731

Please sign in to comment.