2019-09-29 08:52:39 -04:00
|
|
|
---
|
|
|
|
kind: pipeline
|
|
|
|
name: go1.12
|
|
|
|
|
|
|
|
steps:
|
2019-08-26 22:17:23 -04:00
|
|
|
|
2019-09-29 08:52:39 -04:00
|
|
|
- name: test
|
|
|
|
pull: default
|
|
|
|
image: golang:1.12
|
|
|
|
commands:
|
|
|
|
- go vet
|
|
|
|
- "go test -v -race -coverprofile=coverage.txt -covermode=atomic -dbConn=\"root:@tcp(mysql:3306)/core_test?charset=utf8mb4\""
|
|
|
|
environment:
|
|
|
|
GO111MODULE: "on"
|
|
|
|
GOPROXY: https://goproxy.cn
|
|
|
|
when:
|
|
|
|
event:
|
|
|
|
- push
|
|
|
|
- tag
|
|
|
|
- pull_request
|
2019-08-26 22:17:23 -04:00
|
|
|
|
|
|
|
services:
|
2019-09-29 08:52:39 -04:00
|
|
|
- name: mysql
|
|
|
|
pull: default
|
|
|
|
image: mysql:5.7
|
|
|
|
environment:
|
|
|
|
MYSQL_ALLOW_EMPTY_PASSWORD: yes
|
|
|
|
MYSQL_DATABASE: core_test
|
|
|
|
when:
|
|
|
|
event:
|
|
|
|
- push
|
|
|
|
- tag
|
|
|
|
- pull_request
|