zggsong 2 years ago
parent 51ffc3db7a
commit 5a89261e61

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

@ -5,5 +5,9 @@ import (
)
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