Skip to content

Commit cc386f7

Browse files
committed
add travis and glide.
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
1 parent 9a2d7fe commit cc386f7

File tree

6 files changed

+66
-0
lines changed

6 files changed

+66
-0
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,5 @@ _testmain.go
2222
*.exe
2323
*.test
2424
*.prof
25+
26+
vendor

.travis.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
sudo: required
2+
3+
language: go
4+
5+
go:
6+
- 1.5
7+
- 1.6
8+
- 1.6.3
9+
- tip
10+
11+
services:
12+
- docker
13+
- redis
14+
15+
before_install:
16+
- test -d $GOPATH/bin || mkdir -p $GOPATH/bin
17+
- curl https://glide.sh/get | sh
18+
19+
install:
20+
- export GO15VENDOREXPERIMENT=1
21+
- glide install
22+
23+
script:
24+
- go test -v .

glide.lock

Lines changed: 16 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

glide.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
package: github.com/appleboy/golang-testing
2+
import: []
3+
testImport:
4+
- package: github.com/stretchr/testify
5+
subpackages:
6+
- assert

hello.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
package hello
2+
3+
import "fmt"
4+
5+
func hello(name string) string {
6+
7+
return fmt.Sprintf("Hello, %s", name)
8+
}

hello_test.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
package hello
2+
3+
import (
4+
"github.com/stretchr/testify/assert"
5+
"testing"
6+
)
7+
8+
func TestHello(t *testing.T) {
9+
assert.Equal(t, "Hello, appleboy", hello("appleboy"))
10+
}

0 commit comments

Comments
 (0)