Skip to content

Commit

Permalink
add travis
Browse files Browse the repository at this point in the history
  • Loading branch information
JJJJJJJerk committed Dec 19, 2017
1 parent 39d0bbf commit 0caae1c
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 5 deletions.
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
language: go

sudo: false
go:
- 1.8.x
- tip
Expand All @@ -8,7 +8,7 @@ before_install:
- go get -t -v ./...

script:
- go test -race -coverprofile=coverage.txt -covermode=atomic
- ./go.test.sh

after_success:
- bash <(curl -s https://codecov.io/bash) -t d93442cf-8aac-4a40-9aef-125c99119c6e
- bash <(curl -s https://codecov.io/bash)
4 changes: 2 additions & 2 deletions captcha_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ func TestGenerateCaptcha(t *testing.T) {
}
CaptchaWriteToFile(cap, GoTestOutputDir+"/all", idkey, ext)

t.Log(idkey, globalStore.Get(idkey, false))
//t.Log(idkey, globalStore.Get(idkey, false))

}

Expand All @@ -54,7 +54,7 @@ func TestGenerateCaptcha(t *testing.T) {
ext := "png"
CaptchaWriteToFile(cap, GoTestOutputDir+"/all", "char_"+idkey, ext)

t.Log(idkey, globalStore.Get(idkey, false))
//t.Log(idkey, globalStore.Get(idkey, false))

}
}
12 changes: 12 additions & 0 deletions go.test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env bash

set -e
echo "" > coverage.txt

for d in $(go list ./... | grep -v vendor); do
go test -race -coverprofile=profile.out -covermode=atomic $d
if [ -f profile.out ]; then
cat profile.out >> coverage.txt
rm profile.out
fi
done

0 comments on commit 0caae1c

Please sign in to comment.