From 1ff62bff73bbaca29433680444e30eae3db96e94 Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Fri, 31 Aug 2018 21:15:37 +0800 Subject: [PATCH 01/11] use droneci --- .drone.yml | 59 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 .drone.yml diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..5fb8987 --- /dev/null +++ b/.drone.yml @@ -0,0 +1,59 @@ +workspace: + base: /go + path: src/github.com/lunny/tango + +clone: + git: + image: plugins/git:next + depth: 50 + tags: true + +pipeline: + + test: + image: golang:1.8 + #group: testing + pull: true + commands: + - go get -t -d -v ./... + - go build -v + - go test -v -race -coverprofile=coverage.txt -covermode=atomic + - bash <(curl -s https://codecov.io/bash) + when: + event: [ push, tag, pull_request ] + + test: + image: golang:1.9 + #group: testing + pull: true + commands: + - go get -t -d -v ./... + - go build -v + - go test -v -race -coverprofile=coverage.txt -covermode=atomic + - bash <(curl -s https://codecov.io/bash) + when: + event: [ push, tag, pull_request ] + + test: + image: golang:1.10 + #group: testing + pull: true + commands: + - go get -t -d -v ./... + - go build -v + - go test -v -race -coverprofile=coverage.txt -covermode=atomic + - bash <(curl -s https://codecov.io/bash) + when: + event: [ push, tag, pull_request ] + + test: + image: golang:1.11 + #group: testing + pull: true + commands: + - go get -t -d -v ./... + - go build -v + - go test -v -race -coverprofile=coverage.txt -covermode=atomic + - bash <(curl -s https://codecov.io/bash) + when: + event: [ push, tag, pull_request ] \ No newline at end of file From 0959b94719866a808e24d9444eed10c0e401c6b2 Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Sat, 1 Sep 2018 08:18:31 +0800 Subject: [PATCH 02/11] update drone --- .drone.yml | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/.drone.yml b/.drone.yml index 5fb8987..11a200a 100644 --- a/.drone.yml +++ b/.drone.yml @@ -18,9 +18,14 @@ pipeline: - go get -t -d -v ./... - go build -v - go test -v -race -coverprofile=coverage.txt -covermode=atomic - - bash <(curl -s https://codecov.io/bash) when: event: [ push, tag, pull_request ] + + codecov: + image: robertstettner/drone-codecov + token: ${CODECOV_TOKEN} + files: + - coverage.txt test: image: golang:1.9 @@ -29,8 +34,6 @@ pipeline: commands: - go get -t -d -v ./... - go build -v - - go test -v -race -coverprofile=coverage.txt -covermode=atomic - - bash <(curl -s https://codecov.io/bash) when: event: [ push, tag, pull_request ] @@ -41,8 +44,6 @@ pipeline: commands: - go get -t -d -v ./... - go build -v - - go test -v -race -coverprofile=coverage.txt -covermode=atomic - - bash <(curl -s https://codecov.io/bash) when: event: [ push, tag, pull_request ] @@ -53,7 +54,5 @@ pipeline: commands: - go get -t -d -v ./... - go build -v - - go test -v -race -coverprofile=coverage.txt -covermode=atomic - - bash <(curl -s https://codecov.io/bash) when: event: [ push, tag, pull_request ] \ No newline at end of file From f35250e2db31ac9cbd9fe274c4447ef73070dc83 Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Sat, 1 Sep 2018 08:24:10 +0800 Subject: [PATCH 03/11] update drone --- .drone.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.drone.yml b/.drone.yml index 11a200a..60e6b2c 100644 --- a/.drone.yml +++ b/.drone.yml @@ -20,10 +20,10 @@ pipeline: - go test -v -race -coverprofile=coverage.txt -covermode=atomic when: event: [ push, tag, pull_request ] - + codecov: - image: robertstettner/drone-codecov - token: ${CODECOV_TOKEN} + image: plugins/codecov + secrets: [ codecov_token ] files: - coverage.txt From 3cf4bb322aef730c85a420dcd7a4ef3547e86951 Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Sat, 1 Sep 2018 10:58:31 +0800 Subject: [PATCH 04/11] update --- .drone.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.drone.yml b/.drone.yml index 60e6b2c..0732a9b 100644 --- a/.drone.yml +++ b/.drone.yml @@ -26,6 +26,8 @@ pipeline: secrets: [ codecov_token ] files: - coverage.txt + when: + event: [push, pull_request] test: image: golang:1.9 From c5b36d1743f81b0faea523ce932c5627cad3b1f2 Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Sat, 1 Sep 2018 13:47:44 +0800 Subject: [PATCH 05/11] update codecov --- .drone.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.drone.yml b/.drone.yml index 0732a9b..5b58f79 100644 --- a/.drone.yml +++ b/.drone.yml @@ -21,13 +21,14 @@ pipeline: when: event: [ push, tag, pull_request ] - codecov: - image: plugins/codecov + coverage: + image: robertstettner/drone-codecov secrets: [ codecov_token ] files: - coverage.txt when: - event: [push, pull_request] + event: [ push, pull_request ] + branch: [ master ] test: image: golang:1.9 From 899a8e4befb0cefeb1ffb832275f8b072e16f36c Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Sat, 1 Sep 2018 13:52:25 +0800 Subject: [PATCH 06/11] update codecov --- .drone.yml | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/.drone.yml b/.drone.yml index 5b58f79..04f7bbd 100644 --- a/.drone.yml +++ b/.drone.yml @@ -12,14 +12,14 @@ pipeline: test: image: golang:1.8 - #group: testing + group: testing pull: true commands: - go get -t -d -v ./... - go build -v - go test -v -race -coverprofile=coverage.txt -covermode=atomic when: - event: [ push, tag, pull_request ] + event: [ push, pull_request ] coverage: image: robertstettner/drone-codecov @@ -28,34 +28,33 @@ pipeline: - coverage.txt when: event: [ push, pull_request ] - branch: [ master ] test: image: golang:1.9 - #group: testing + group: testing pull: true commands: - go get -t -d -v ./... - go build -v when: - event: [ push, tag, pull_request ] + event: [ push, pull_request ] test: image: golang:1.10 - #group: testing + group: testing pull: true commands: - go get -t -d -v ./... - go build -v when: - event: [ push, tag, pull_request ] + event: [ push, pull_request ] test: image: golang:1.11 - #group: testing + group: testing pull: true commands: - go get -t -d -v ./... - go build -v when: - event: [ push, tag, pull_request ] \ No newline at end of file + event: [ push, pull_request ] \ No newline at end of file From 15f49f260e88ac73a727289266344361183a5da0 Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Sat, 1 Sep 2018 14:15:55 +0800 Subject: [PATCH 07/11] codecov --- .drone.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index 04f7bbd..cb18109 100644 --- a/.drone.yml +++ b/.drone.yml @@ -22,7 +22,7 @@ pipeline: event: [ push, pull_request ] coverage: - image: robertstettner/drone-codecov + image: plugins/codecov secrets: [ codecov_token ] files: - coverage.txt From 4696000dd545852e0701e5d4197a7537a28971b2 Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Sat, 29 Sep 2018 09:36:00 +0800 Subject: [PATCH 08/11] update drone config --- .drone.yml | 42 ++++++++---------------------------------- README.md | 2 +- README_CN.md | 2 +- circle.yml | 12 ------------ 4 files changed, 10 insertions(+), 48 deletions(-) delete mode 100644 circle.yml diff --git a/.drone.yml b/.drone.yml index cb18109..6e54fbb 100644 --- a/.drone.yml +++ b/.drone.yml @@ -8,12 +8,16 @@ clone: depth: 50 tags: true -pipeline: +matrix: + GO_VERSION: + - 1.8 + - 1.9 + - 1.10 + - 1.11 +pipeline: test: - image: golang:1.8 - group: testing - pull: true + image: golang:${GO_VERSION} commands: - go get -t -d -v ./... - go build -v @@ -26,35 +30,5 @@ pipeline: secrets: [ codecov_token ] files: - coverage.txt - when: - event: [ push, pull_request ] - - test: - image: golang:1.9 - group: testing - pull: true - commands: - - go get -t -d -v ./... - - go build -v - when: - event: [ push, pull_request ] - - test: - image: golang:1.10 - group: testing - pull: true - commands: - - go get -t -d -v ./... - - go build -v - when: - event: [ push, pull_request ] - - test: - image: golang:1.11 - group: testing - pull: true - commands: - - go get -t -d -v ./... - - go build -v when: event: [ push, pull_request ] \ No newline at end of file diff --git a/README.md b/README.md index 2800dc3..f3472c8 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ Tango [简体中文](README_CN.md) ======================= -[![CircleCI](https://circleci.com/gh/lunny/tango.svg?style=shield)](https://circleci.com/gh/lunny/tango) [![codecov](https://codecov.io/gh/lunny/tango/branch/master/graph/badge.svg)](https://codecov.io/gh/lunny/tango) +[![GitCI](https://gitci.cn/api/badges/lunny/tango/status.svg)](https://gitci.cn/gh/lunny/tango) [![codecov](https://codecov.io/gh/lunny/tango/branch/master/graph/badge.svg)](https://codecov.io/gh/lunny/tango) [![](https://goreportcard.com/badge/github.com/lunny/tango)](https://goreportcard.com/report/github.com/lunny/tango) [![Join the chat at https://img.shields.io/discord/323705316027924491.svg](https://img.shields.io/discord/323705316027924491.svg)](https://discord.gg/7Ckxjwu) diff --git a/README_CN.md b/README_CN.md index cb3b2ea..a4508e5 100644 --- a/README_CN.md +++ b/README_CN.md @@ -1,4 +1,4 @@ -Tango [![CircleCI](https://circleci.com/gh/lunny/tango.svg?style=shield)](https://circleci.com/gh/lunny/tango) [![codecov](https://codecov.io/gh/lunny/tango/branch/master/graph/badge.svg)](https://codecov.io/gh/lunny/tango) +Tango [![GitCI](https://gitci.cn/api/badges/lunny/tango/status.svg)](https://gitci.cn/gh/lunny/tango) [![codecov](https://codecov.io/gh/lunny/tango/branch/master/graph/badge.svg)](https://codecov.io/gh/lunny/tango) [![](https://goreportcard.com/badge/github.com/lunny/tango)](https://goreportcard.com/report/github.com/lunny/tango) [![Join the chat at https://img.shields.io/discord/323705316027924491.svg](https://img.shields.io/discord/323705316027924491.svg)](https://discord.gg/7Ckxjwu) [English](README.md) diff --git a/circle.yml b/circle.yml deleted file mode 100644 index e0a2729..0000000 --- a/circle.yml +++ /dev/null @@ -1,12 +0,0 @@ -dependencies: - override: - # './...' is a relative pattern which means all subdirectories - - go get -t -d -v ./... - - go build -v - -test: - override: - # './...' is a relative pattern which means all subdirectories - - go test -v -race -coverprofile=coverage.txt -covermode=atomic - post: - - bash <(curl -s https://codecov.io/bash) \ No newline at end of file From 4bb4858a0608aa196d44508c703f578425212797 Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Sat, 29 Sep 2018 09:39:40 +0800 Subject: [PATCH 09/11] remove blank --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f3472c8..95719e4 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ Tango [简体中文](README_CN.md) ======================= -[![GitCI](https://gitci.cn/api/badges/lunny/tango/status.svg)](https://gitci.cn/gh/lunny/tango) [![codecov](https://codecov.io/gh/lunny/tango/branch/master/graph/badge.svg)](https://codecov.io/gh/lunny/tango) +[![GitCI](https://gitci.cn/api/badges/lunny/tango/status.svg)](https://gitci.cn/gh/lunny/tango) [![codecov](https://codecov.io/gh/lunny/tango/branch/master/graph/badge.svg)](https://codecov.io/gh/lunny/tango) [![](https://goreportcard.com/badge/github.com/lunny/tango)](https://goreportcard.com/report/github.com/lunny/tango) [![Join the chat at https://img.shields.io/discord/323705316027924491.svg](https://img.shields.io/discord/323705316027924491.svg)](https://discord.gg/7Ckxjwu) From 905377be0182191da7fb220e67d79e377a094e26 Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Sat, 29 Sep 2018 09:43:26 +0800 Subject: [PATCH 10/11] fix coverage --- .drone.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.drone.yml b/.drone.yml index 6e54fbb..b88a7b1 100644 --- a/.drone.yml +++ b/.drone.yml @@ -26,9 +26,10 @@ pipeline: event: [ push, pull_request ] coverage: - image: plugins/codecov + image: robertstettner/drone-codecov secrets: [ codecov_token ] files: - coverage.txt when: - event: [ push, pull_request ] \ No newline at end of file + event: [ push, pull_request ] + branch: [ master ] \ No newline at end of file From b8292c1810e02040b3bd826fa65fd3f3909141ca Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Sat, 29 Sep 2018 09:57:12 +0800 Subject: [PATCH 11/11] fix codecov token name --- .drone.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index b88a7b1..1cff9b0 100644 --- a/.drone.yml +++ b/.drone.yml @@ -27,7 +27,7 @@ pipeline: coverage: image: robertstettner/drone-codecov - secrets: [ codecov_token ] + secrets: [ codecov_token2 ] files: - coverage.txt when: