enable drone cache
This commit is contained in:
parent
29c93926a7
commit
1cf0802406
48
.drone.yml
48
.drone.yml
|
@ -2,8 +2,25 @@
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
name: testing
|
name: testing
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
|
- name: restore-cache
|
||||||
|
image: meltwater/drone-cache:dev
|
||||||
|
pull: true
|
||||||
|
settings:
|
||||||
|
backend: "filesystem"
|
||||||
|
restore: true
|
||||||
|
cache_key: "volume"
|
||||||
|
archive_format: "gzip"
|
||||||
|
mount:
|
||||||
|
- '${GOPATH}/pkg/mod'
|
||||||
|
volumes:
|
||||||
|
- name: cache
|
||||||
|
path: /tmp/cache
|
||||||
|
|
||||||
- name: test-vet
|
- name: test-vet
|
||||||
image: golang:1.11
|
image: golang:1.11
|
||||||
|
depends_on:
|
||||||
|
- restore-cache
|
||||||
environment:
|
environment:
|
||||||
GO111MODULE: "on"
|
GO111MODULE: "on"
|
||||||
GOPROXY: "https://goproxy.cn"
|
GOPROXY: "https://goproxy.cn"
|
||||||
|
@ -14,8 +31,26 @@ steps:
|
||||||
- push
|
- push
|
||||||
- pull_request
|
- pull_request
|
||||||
|
|
||||||
|
- name: rebuild-cache
|
||||||
|
image: meltwater/drone-cache:dev
|
||||||
|
depends_on:
|
||||||
|
- test-vet
|
||||||
|
pull: true
|
||||||
|
settings:
|
||||||
|
backend: "filesystem"
|
||||||
|
rebuild: true
|
||||||
|
cache_key: "volume"
|
||||||
|
archive_format: "gzip"
|
||||||
|
mount:
|
||||||
|
- '${GOPATH}/pkg/mod'
|
||||||
|
volumes:
|
||||||
|
- name: cache
|
||||||
|
path: /tmp/cache
|
||||||
|
|
||||||
- name: test-sqlite
|
- name: test-sqlite
|
||||||
image: golang:1.12
|
image: golang:1.12
|
||||||
|
depends_on:
|
||||||
|
- rebuild-cache
|
||||||
environment:
|
environment:
|
||||||
GO111MODULE: "on"
|
GO111MODULE: "on"
|
||||||
GOPROXY: "https://goproxy.cn"
|
GOPROXY: "https://goproxy.cn"
|
||||||
|
@ -31,6 +66,8 @@ steps:
|
||||||
|
|
||||||
- name: test-mysql
|
- name: test-mysql
|
||||||
image: golang:1.12
|
image: golang:1.12
|
||||||
|
depends_on:
|
||||||
|
- rebuild-cache
|
||||||
environment:
|
environment:
|
||||||
GO111MODULE: "on"
|
GO111MODULE: "on"
|
||||||
GOPROXY: "https://goproxy.cn"
|
GOPROXY: "https://goproxy.cn"
|
||||||
|
@ -49,6 +86,8 @@ steps:
|
||||||
|
|
||||||
- name: test-mysql8
|
- name: test-mysql8
|
||||||
image: golang:1.12
|
image: golang:1.12
|
||||||
|
depends_on:
|
||||||
|
- rebuild-cache
|
||||||
environment:
|
environment:
|
||||||
GO111MODULE: "on"
|
GO111MODULE: "on"
|
||||||
GOPROXY: "https://goproxy.cn"
|
GOPROXY: "https://goproxy.cn"
|
||||||
|
@ -68,6 +107,7 @@ steps:
|
||||||
- name: test-mysql-utf8mb4
|
- name: test-mysql-utf8mb4
|
||||||
image: golang:1.12
|
image: golang:1.12
|
||||||
depends_on:
|
depends_on:
|
||||||
|
- rebuild-cache
|
||||||
- test-mysql
|
- test-mysql
|
||||||
environment:
|
environment:
|
||||||
GO111MODULE: "on"
|
GO111MODULE: "on"
|
||||||
|
@ -89,7 +129,7 @@ steps:
|
||||||
pull: default
|
pull: default
|
||||||
image: golang:1.12
|
image: golang:1.12
|
||||||
depends_on:
|
depends_on:
|
||||||
- test-mysql-utf8mb4
|
- test-mysql-utf8mb4
|
||||||
environment:
|
environment:
|
||||||
GO111MODULE: "on"
|
GO111MODULE: "on"
|
||||||
GOPROXY: "https://goproxy.cn"
|
GOPROXY: "https://goproxy.cn"
|
||||||
|
@ -108,6 +148,8 @@ steps:
|
||||||
- name: test-postgres
|
- name: test-postgres
|
||||||
pull: default
|
pull: default
|
||||||
image: golang:1.12
|
image: golang:1.12
|
||||||
|
depends_on:
|
||||||
|
- rebuild-cache
|
||||||
environment:
|
environment:
|
||||||
GO111MODULE: "on"
|
GO111MODULE: "on"
|
||||||
GOPROXY: "https://goproxy.cn"
|
GOPROXY: "https://goproxy.cn"
|
||||||
|
@ -147,6 +189,8 @@ steps:
|
||||||
- name: test-mssql
|
- name: test-mssql
|
||||||
pull: default
|
pull: default
|
||||||
image: golang:1.12
|
image: golang:1.12
|
||||||
|
depends_on:
|
||||||
|
- rebuild-cache
|
||||||
environment:
|
environment:
|
||||||
GO111MODULE: "on"
|
GO111MODULE: "on"
|
||||||
GOPROXY: "https://goproxy.cn"
|
GOPROXY: "https://goproxy.cn"
|
||||||
|
@ -165,6 +209,8 @@ steps:
|
||||||
- name: test-tidb
|
- name: test-tidb
|
||||||
pull: default
|
pull: default
|
||||||
image: golang:1.12
|
image: golang:1.12
|
||||||
|
depends_on:
|
||||||
|
- rebuild-cache
|
||||||
environment:
|
environment:
|
||||||
GO111MODULE: "on"
|
GO111MODULE: "on"
|
||||||
GOPROXY: "https://goproxy.cn"
|
GOPROXY: "https://goproxy.cn"
|
||||||
|
|
Loading…
Reference in New Issue