zggsong 2 years ago
parent 51ffc3db7a
commit 5a89261e61

@ -1,9 +1,10 @@
# .drone.yml workspace:
kind: pipeline base: /go
name: default path: src/gogs.kikakika.com/lihongfeng/first
steps: pipeline:
- name: run build:
image: golang image: golang:1.10.2
commands: commands:
- go build - go test
- go build

@ -5,5 +5,9 @@ import (
) )
func main() { func main() {
fmt.Println("hello world") fmt.Printf("hello world")
}
func hello() string {
return "hello world"
} }

@ -0,0 +1,9 @@
package main
import "testing"
func TestHello(t *testing.T) {
if hello() != "hello world" {
t.Error("Testing error")
}
}
Loading…
Cancel
Save