File tree Expand file tree Collapse file tree 1 file changed +4
-22
lines changed Expand file tree Collapse file tree 1 file changed +4
-22
lines changed Original file line number Diff line number Diff line change 1
- machine :
2
- environment :
3
- GOPATH : " ${HOME}/.go_project"
4
- checkout :
5
- post :
6
- - mkdir -p /home/ubuntu/.go_project/src/gopkg.in
7
- - ln -s /home/ubuntu/authboss /home/ubuntu/.go_project/src/github.com/go-authboss/authboss
8
- dependencies :
9
- override :
10
- - cd /home/ubuntu/.go_project/src/github.com/go-authboss/authboss && go get -t -d -v ./...
11
- - cd /home/ubuntu/.go_project/src/github.com/go-authboss/authboss && go build -v
12
1
test :
13
2
pre :
14
3
- go get github.com/jstemmer/go-junit-report
15
4
- go get github.com/mattn/goveralls
16
5
override :
6
+ - go test -v -race ./... > $CIRCLE_ARTIFACTS/gotest.txt
17
7
- >
18
- cd /home/ubuntu/.go_project/src/github.com/go-authboss/authboss &&
19
- go test -v -race ./... > $CIRCLE_ARTIFACTS/gotest.txt
20
- - >
21
- cd /home/ubuntu/.go_project/src/github.com/go-authboss/authboss &&
22
8
echo "mode: set" > $CIRCLE_ARTIFACTS/coverage.txt &&
23
9
for i in $(go list ./...); do
24
10
rm -f coverage.tmp;
25
- go test -v -coverprofile coverage.tmp $i &&
11
+ go test -v -coverprofile coverage.tmp $i;
26
12
tail -n +2 coverage.tmp >> $CIRCLE_ARTIFACTS/coverage.txt;
27
13
done
28
14
post :
29
- - cat $CIRCLE_ARTIFACTS/gotest.txt | /home/ubuntu/.go_project/bin/go-junit-report > $CIRCLE_TEST_REPORTS/junit.xml
30
- - >
31
- if [ -n "$COVERALLS_TOKEN" ]; then
32
- cd /home/ubuntu/.go_project/src/github.com/go-authboss/authboss &&
33
- /home/ubuntu/.go_project/bin/goveralls -coverprofile=$CIRCLE_ARTIFACTS/coverage.txt -service=circle-ci -repotoken=$COVERALLS_TOKEN;
34
- fi
15
+ - cat $CIRCLE_ARTIFACTS/gotest.txt | go-junit-report > $CIRCLE_TEST_REPORTS/junit.xml
16
+ - goveralls -coverprofile=$CIRCLE_ARTIFACTS/coverage.txt -service=circle-ci -repotoken=$COVERALLS_TOKEN
You can’t perform that action at this time.
0 commit comments