From f59b1ceec6f6224c3770efb8f6e3997ad377f377 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dawid=20Wysoki=C5=84ski?= Date: Sun, 9 Oct 2022 08:38:29 +0200 Subject: [PATCH] feat(ci/cd): add cache --- .drone.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.drone.yml b/.drone.yml index 7384aa3..5c05340 100644 --- a/.drone.yml +++ b/.drone.yml @@ -25,6 +25,8 @@ steps: image: golang:1.19 environment: TESTS_DB_DSN: postgres://postgres:dcbot@database:5432/dcbot?sslmode=disable + GOMODCACHE: /drone/src/.cache/test/go-mod + GOCACHE: /drone/src/.cache/test/go-build commands: - make generate - go test -race -coverprofile=coverage.txt -covermode=atomic ./... @@ -85,6 +87,9 @@ steps: - .cache/gomod/go-build - name: check go.mod image: golang:1.19 + environment: + GOMODCACHE: /drone/src/.cache/gomod/go-mod + GOCACHE: /drone/src/.cache/gomod/go-build commands: - make generate - go mod tidy @@ -140,6 +145,10 @@ steps: - .cache/lint/golangci-lint - name: run golangci-lint image: golangci/golangci-lint:v1.50 + environment: + GOMODCACHE: /drone/src/.cache/lint/go-mod + GOCACHE: /drone/src/.cache/lint/go-build + GOLANGCI_LINT_CACHE: /drone/src/.cache/lint/golangci-lint commands: - make generate - golangci-lint run