-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy path.travis.yml
56 lines (52 loc) · 2.72 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
language: go
go: "1.13"
before_install:
- go get github.com/axw/gocov/gocov
- go get github.com/mattn/goveralls
- go get golang.org/x/tools/cmd/goimports
- go install golang.org/x/tools/cmd/goimports
install:
- export PATH=$PATH:$HOME/gopath/bin
- go get github.com/aryann/difflib
- go get github.com/grsmv/inflect
- go get github.com/Knetic/govaluate
- go get github.com/lib/pq
- go get github.com/go-sql-driver/mysql
- go get github.com/microsoft/go-mssqldb
services:
- postgres
- mysql
addons:
postgresql: "9.6"
before_script:
- psql -c "CREATE USER golang WITH PASSWORD '123456';" -U postgres
- psql -c "create database golang with OWNER = golang;" -U postgres
- mysql -e "CREATE USER 'golang' IDENTIFIED BY '123456';"
- mysql -e "create database golang;"
script:
- mkdir -p tmp
- mkdir -p goparser/tmp/rr
- mkdir -p goparser/tmp/group
- mkdir -p goparser/tmp/user
- touch tmp/a.xml
- touch goparser/tmp/rr/rr.go
- touch goparser/tmp/group/group.go
- touch goparser/tmp/user/user.go
- touch goparser/tmp/user/profile.go
- echo package role >> goparser/tmp/rr/rr.go
- echo package group >> goparser/tmp/group/group.go
- echo package user >> goparser/tmp/user/user.go
- echo package user >> goparser/tmp/user/profile.go
- ls -l goparser/tmp
- cd cmd/gobatis
- go install
- cd ../..
- go install
- go generate ./...
- rm gentest/fail/interface.gobatis.go
- gobatis_dump_statements=true go test -v -covermode=count -coverprofile=profile1.cov -coverpkg=github.com/runner-mei/GoBatis,github.com/runner-mei/GoBatis/goparser,github.com/runner-mei/GoBatis/reflectx ./...
- go test -v -covermode=count -coverprofile=profile2.cov -coverpkg=github.com/runner-mei/GoBatis,github.com/runner-mei/GoBatis/goparser,github.com/runner-mei/GoBatis/reflectx -dbDrv=mysql "-dbURL=travis:@tcp(localhost:3306)/golang?autocommit=true&parseTime=true&multiStatements=true" ./...
- $HOME/gopath/bin/goveralls -coverprofile=profile1.cov,profile2.cov -service=travis-ci -repotoken=$COVERALLS_TOKEN -v -show
env:
global:
secure: N3DaOmCbZS46jriOkMzSexVs+agk8YkdCoZbYUmDEYLjXv0EdXvKYiRqbgeLPIizBvQxJgJjXu8x2qV4E+nlXKgZivZe+fiFuXci2HqDNnzcK5VeUwBwaMLLkwpxlgymQGJdTmOtZsdlKByfT/lhzFVnketUlBNubC8ykpMxHntYd8GFJawSL2Y5pdJquqqey2dfhZ+alcSuYWKiX4RCN/9XGDRu+WCXiS/CxzHCs8XCPppuJjcZKMio6T1qjkO1WEQT3Uxepk0f+iUmMw/BwDeFvxABdQUsSWm4Vy4Or3q+efU1w8XjYxt+eBAjm16T3EU2l05wir5a6fS/UiDpgjon484ZPrrZ+1qKcKCd91lx24+jB71An4WsZDiqErroh5eOSv5gWWG3/1lah+w4CI7bN5TVhY/mILba+S/xAchn18dyffhv34I5cXnDjqVJiNqZHpoxk9YuLAYOgE6/X7HvYr+ON1buq07KJYdpFmQZaaLZcGyXsf9VvAf7AYX7Zs8xb/+DuKKGgBOFJHUU4Piwu9kboak0xHAAGkszwHR0L/NoItqaivmlyg2JYQ8ID2E0rxRhSj3S1HmWSpKfkfkvV6ftJG+FbMrKqH42F35LXwG9Wp3WnNzwxazMgg/jwXaDPKb3IJmBtfD5uGP3wl5PDlLHWMZGOm903LIFSw8=