Browse Source

new format drone (#60)

tags/v0.6.1
Lunny Xiao Gitea 3 months ago
parent
commit
964f0f7570
2 changed files with 102 additions and 19 deletions
  1. +100
    -15
      .drone.yml
  2. +2
    -4
      context_test.go

+ 100
- 15
.drone.yml View File

@@ -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

matrix:
GO_VERSION:
- 1.8
- 1.9
- 1.10
- 1.11
settings:
depth: 50
tags: true

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

+ 2
- 4
context_test.go View File

@@ -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…
Cancel
Save