-
Notifications
You must be signed in to change notification settings - Fork 3
/
.drone.yml
85 lines (82 loc) · 1.53 KB
/
.drone.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
---
kind: pipeline
name: lint
type: docker
steps:
- name: mod tidy
image: "pr0ger/baseimage:build.go-latest"
commands:
- go mod tidy -v
- git diff --exit-code
- name: lint
image: "golangci/golangci-lint:v1.59-alpine"
commands:
- go install github.com/golang/mock/mockgen@latest
- go generate -x
- golangci-lint run -v
---
kind: pipeline
name: tests 1.20
type: docker
steps:
- name: build
image: "pr0ger/baseimage:build.go-1.20"
commands:
- go mod download
- go generate -x
- go build -v
volumes:
- name: deps
path: /go
- name: test
image: "pr0ger/baseimage:build.go-1.20"
commands:
- go test -v ./...
volumes:
- name: deps
path: /go
---
kind: pipeline
name: tests 1.21
type: docker
steps:
- name: build
image: "pr0ger/baseimage:build.go-1.21"
commands:
- go mod download
- go generate -x
- go build -v
volumes:
- name: deps
path: /go
- name: test
image: "pr0ger/baseimage:build.go-1.21"
commands:
- go test -v ./...
volumes:
- name: deps
path: /go
---
kind: pipeline
name: update docs
type: docker
clone:
disable: true
trigger:
event:
- tag
depends_on:
- "tests 1.20"
- "tests 1.21"
steps:
- name: pkg.go.dev
image: "alpine:latest"
commands:
- apk add curl jq
- curl -s https://proxy.golang.org/go.pr0ger.dev/logger/@v/${DRONE_TAG}.info | jq
- name: godocs.io
image: "alpine:latest"
commands:
- apk add curl
- echo 'nameserver 1.1.1.1' > /etc/resolv.conf
- curl -X "POST" "https://godocs.io/-/refresh?import_path=go.pr0ger.dev%2Flogger&platform=linux%2Famd64"