circle.yml 1.4 KB

1234567891011121314151617181920212223242526272829
  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. test:
  20. override:
  21. # './...' is a relative pattern which means all subdirectories
  22. - go test -v -race -db="sqlite3::mysql::postgres" -conn_str="./test.db::root:@/xorm_test::dbname=xorm_test sslmode=disable" -coverprofile=coverage.txt -covermode=atomic
  23. - cd /home/ubuntu/.go_workspace/src/github.com/go-xorm/tests && ./sqlite3.sh
  24. - cd /home/ubuntu/.go_workspace/src/github.com/go-xorm/tests && ./mysql.sh
  25. - cd /home/ubuntu/.go_workspace/src/github.com/go-xorm/tests && ./postgres.sh
  26. post:
  27. - bash <(curl -s https://codecov.io/bash)