new format drone #60
115
.drone.yml
115
.drone.yml
|
@ -1,26 +1,111 @@
|
|||
---
|
||||
kind: pipeline
|
||||
name: go110
|
||||
|
||||
platform:
|
||||
os: linux
|
||||
arch: amd64
|
||||
|
||||
clone:
|
||||
disable: true
|
||||
|
||||
workspace:
|
||||
base: /go
|
||||
path: src/gitea.com/lunny/tango
|
||||
|
||||
clone:
|
||||
git:
|
||||
steps:
|
||||
- name: git
|
||||
pull: default
|
||||
image: plugins/git:next
|
||||
depth: 50
|
||||
tags: true
|
||||
settings:
|
||||
depth: 50
|
||||
tags: true
|
||||
|
||||
matrix:
|
||||
GO_VERSION:
|
||||
- 1.8
|
||||
- 1.9
|
||||
- 1.10
|
||||
- 1.11
|
||||
|
||||
pipeline:
|
||||
test:
|
||||
image: golang:${GO_VERSION}
|
||||
- name: test
|
||||
pull: default
|
||||
image: golang:1.10
|
||||
commands:
|
||||
- go get -t -d -v ./...
|
||||
- go build -v
|
||||
- go vet ./...
|
||||
- go test -v -race -coverprofile=coverage.txt -covermode=atomic
|
||||
when:
|
||||
event: [ push, pull_request ]
|
||||
event:
|
||||
- push
|
||||
- pull_request
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
name: go111
|
||||
|
||||
platform:
|
||||
os: linux
|
||||
arch: amd64
|
||||
|
||||
clone:
|
||||
disable: true
|
||||
|
||||
workspace:
|
||||
base: /go
|
||||
path: src/tango111
|
||||
|
||||
steps:
|
||||
- name: git
|
||||
pull: default
|
||||
image: plugins/git:next
|
||||
settings:
|
||||
depth: 50
|
||||
tags: true
|
||||
|
||||
- name: test
|
||||
pull: default
|
||||
image: golang:1.11
|
||||
environment:
|
||||
GO111MODULE: on
|
||||
GOPROXY: https://goproxy.cn
|
||||
commands:
|
||||
- go build -v
|
||||
- go vet ./...
|
||||
- go test -v -race -coverprofile=coverage.txt -covermode=atomic
|
||||
when:
|
||||
event:
|
||||
- push
|
||||
- pull_request
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
name: go112
|
||||
|
||||
platform:
|
||||
os: linux
|
||||
arch: amd64
|
||||
|
||||
clone:
|
||||
disable: true
|
||||
|
||||
workspace:
|
||||
base: /go
|
||||
path: src/tango112
|
||||
|
||||
steps:
|
||||
- name: git
|
||||
pull: default
|
||||
image: plugins/git:next
|
||||
settings:
|
||||
depth: 50
|
||||
tags: true
|
||||
|
||||
- name: test
|
||||
pull: default
|
||||
image: golang:1.12
|
||||
environment:
|
||||
GO111MODULE: on
|
||||
GOPROXY: https://goproxy.cn
|
||||
commands:
|
||||
- go build -v
|
||||
- go vet ./...
|
||||
- go test -v -race -coverprofile=coverage.txt -covermode=atomic
|
||||
when:
|
||||
event:
|
||||
- push
|
||||
- pull_request
|
|
@ -437,7 +437,7 @@ func TestContextDecodeXML(t *testing.T) {
|
|||
}
|
||||
|
||||
type ActionTag struct {
|
||||
Name string `name`
|
||||
Name string `tag:"name"`
|
||||
}
|
||||
|
||||
func (a *ActionTag) Get() interface{} {
|
||||
|
@ -459,9 +459,7 @@ func TestContextActionTag(t *testing.T) {
|
|||
}
|
||||
|
||||
tagName := ctx.ActionTag("Name")
|
||||
if tagName == "name" {
|
||||
fmt.Println("find the action")
|
||||
}
|
||||
expect(t, `tag:"name"`, tagName)
|
||||
}))
|
||||
o.Get("/", new(ActionTag))
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user