forked from GoAdminGroup/go-admin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
27 lines (21 loc) · 968 Bytes
/
.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
language: go
sudo: true
go:
- 1.13.x
env:
- GO111MODULE=on PGPASSWORD=root GOPROXY=https://goproxy.io,https://goproxy.cn,direct
services:
- mysql
- postgresql
before_install:
- mysql -e 'create database `go-admin-test`;'
- createdb -U postgres go-admin-test
before_script:
- echo "USE mysql;\nUPDATE user SET authentication_string=PASSWORD('root') WHERE user='root';\nFLUSH PRIVILEGES;\n" | mysql -u root
- psql -c "ALTER USER postgres WITH PASSWORD 'root';" -U postgres
- go get -u github.com/rakyll/gotest
- go get -u -v github.com/gogf/[email protected]
- sudo chmod -R 777 $GOPATH/pkg/mod/github.com/gogf/[email protected]/net/ghttp/ghttp_server_handler.go
- sudo echo -e "\nfunc (s *Server) DefaultHttpHandle(w http.ResponseWriter, r *http.Request) { \n s.handleRequest(w, r) \n}\n" >> $GOPATH/pkg/mod/github.com/gogf/[email protected]/net/ghttp/ghttp_server_handler.go
script:
- cd /home/travis/gopath/src/github.com/GoAdminGroup/go-admin && make test