circle.yml 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. dependencies:
  2. override:
  3. # './...' is a relative pattern which means all subdirectories
  4. - go get -t -d -v ./...
  5. - go get -t -d -v github.com/go-xorm/tests
  6. - go get -u github.com/go-xorm/core
  7. - go get -u github.com/go-xorm/builder
  8. - go build -v
  9. database:
  10. override:
  11. - mysql -u root -e "CREATE DATABASE xorm_test DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci"
  12. - mysql -u root -e "CREATE DATABASE xorm_test1 DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci"
  13. - mysql -u root -e "CREATE DATABASE xorm_test2 DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci"
  14. - mysql -u root -e "CREATE DATABASE xorm_test3 DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci"
  15. - createdb -p 5432 -e -U postgres xorm_test
  16. - createdb -p 5432 -e -U postgres xorm_test1
  17. - createdb -p 5432 -e -U postgres xorm_test2
  18. - createdb -p 5432 -e -U postgres xorm_test3
  19. - psql xorm_test postgres -c "create schema xorm"
  20. test:
  21. override:
  22. # './...' is a relative pattern which means all subdirectories
  23. - go get -u github.com/wadey/gocovmerge;
  24. - go test -v -race -db="sqlite3" -conn_str="./test.db" -coverprofile=coverage1-1.txt -covermode=atomic
  25. - go test -v -race -db="sqlite3" -conn_str="./test.db" -cache=true -coverprofile=coverage1-2.txt -covermode=atomic
  26. - go test -v -race -db="mysql" -conn_str="root:@/xorm_test" -coverprofile=coverage2-1.txt -covermode=atomic
  27. - go test -v -race -db="mysql" -conn_str="root:@/xorm_test" -cache=true -coverprofile=coverage2-2.txt -covermode=atomic
  28. - go test -v -race -db="mymysql" -conn_str="xorm_test/root/" -coverprofile=coverage3-1.txt -covermode=atomic
  29. - go test -v -race -db="mymysql" -conn_str="xorm_test/root/" -cache=true -coverprofile=coverage3-2.txt -covermode=atomic
  30. - go test -v -race -db="postgres" -conn_str="dbname=xorm_test sslmode=disable" -coverprofile=coverage4-1.txt -covermode=atomic
  31. - go test -v -race -db="postgres" -conn_str="dbname=xorm_test sslmode=disable" -cache=true -coverprofile=coverage4-2.txt -covermode=atomic
  32. - go test -v -race -db="postgres" -conn_str="dbname=xorm_test sslmode=disable" -schema=xorm -coverprofile=coverage5-1.txt -covermode=atomic
  33. - go test -v -race -db="postgres" -conn_str="dbname=xorm_test sslmode=disable" -schema=xorm -cache=true -coverprofile=coverage5-2.txt -covermode=atomic
  34. - gocovmerge coverage1-1.txt coverage1-2.txt coverage2-1.txt coverage2-2.txt coverage3-1.txt coverage3-2.txt coverage4-1.txt coverage4-2.txt coverage5-1.txt coverage5-2.txt > coverage.txt
  35. - cd /home/ubuntu/.go_workspace/src/github.com/go-xorm/tests && ./sqlite3.sh
  36. - cd /home/ubuntu/.go_workspace/src/github.com/go-xorm/tests && ./mysql.sh
  37. - cd /home/ubuntu/.go_workspace/src/github.com/go-xorm/tests && ./postgres.sh
  38. post:
  39. - bash <(curl -s https://codecov.io/bash)