31 lines
555 B
YAML
Executable File
31 lines
555 B
YAML
Executable File
kind: pipeline
|
|
type: docker
|
|
name: go-drone-test
|
|
|
|
volumes:
|
|
- name: cache
|
|
host:
|
|
path: /tmp/cache
|
|
|
|
steps:
|
|
- name: go-mod # 安装依赖
|
|
image: golang:1.19.3
|
|
volumes:
|
|
- name: cache
|
|
path: /go
|
|
environment:
|
|
GO111MODULE: on
|
|
GOPROXY: https://goproxy.cn,direct
|
|
commands:
|
|
- go mod tidy
|
|
|
|
- name: go-test
|
|
image: golang:1.19.3
|
|
volumes:
|
|
- name: cache
|
|
path: /go
|
|
environment:
|
|
GO111MODULE: on
|
|
GOPROXY: https://goproxy.cn,direct
|
|
commands:
|
|
- go test -v $(go list ./...) |