enable drone cache

This commit is contained in:
Lunny Xiao 2020-02-27 11:10:14 +08:00
parent 29c93926a7
commit 1cf0802406
No known key found for this signature in database
GPG Key ID: C3B7C91B632F738A
1 changed files with 47 additions and 1 deletions

View File

@ -2,8 +2,25 @@
kind: pipeline
name: testing
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
image: golang:1.11
depends_on:
- restore-cache
environment:
GO111MODULE: "on"
GOPROXY: "https://goproxy.cn"
@ -14,8 +31,26 @@ steps:
- push
- 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
image: golang:1.12
depends_on:
- rebuild-cache
environment:
GO111MODULE: "on"
GOPROXY: "https://goproxy.cn"
@ -31,6 +66,8 @@ steps:
- name: test-mysql
image: golang:1.12
depends_on:
- rebuild-cache
environment:
GO111MODULE: "on"
GOPROXY: "https://goproxy.cn"
@ -49,6 +86,8 @@ steps:
- name: test-mysql8
image: golang:1.12
depends_on:
- rebuild-cache
environment:
GO111MODULE: "on"
GOPROXY: "https://goproxy.cn"
@ -68,6 +107,7 @@ steps:
- name: test-mysql-utf8mb4
image: golang:1.12
depends_on:
- rebuild-cache
- test-mysql
environment:
GO111MODULE: "on"
@ -108,6 +148,8 @@ steps:
- name: test-postgres
pull: default
image: golang:1.12
depends_on:
- rebuild-cache
environment:
GO111MODULE: "on"
GOPROXY: "https://goproxy.cn"
@ -147,6 +189,8 @@ steps:
- name: test-mssql
pull: default
image: golang:1.12
depends_on:
- rebuild-cache
environment:
GO111MODULE: "on"
GOPROXY: "https://goproxy.cn"
@ -165,6 +209,8 @@ steps:
- name: test-tidb
pull: default
image: golang:1.12
depends_on:
- rebuild-cache
environment:
GO111MODULE: "on"
GOPROXY: "https://goproxy.cn"