Quellcode durchsuchen

new format drone (#60)

pull/61/head
Lunny Xiao vor 11 Monaten
committed von Gitea
Ursprung
Commit
964f0f7570
2 geänderte Dateien mit 102 neuen und 19 gelöschten Zeilen
  1. +100
    -15
      .drone.yml
  2. +2
    -4
      context_test.go

+ 100
- 15
.drone.yml Datei anzeigen

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

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

Laden…
Abbrechen
Speichern