summaryrefslogtreecommitdiff
path: root/.drone.yml
diff options
context:
space:
mode:
Diffstat (limited to '.drone.yml')
-rw-r--r--.drone.yml29
1 files changed, 26 insertions, 3 deletions
diff --git a/.drone.yml b/.drone.yml
index 42ec83ce4..f6c257216 100644
--- a/.drone.yml
+++ b/.drone.yml
@@ -14,6 +14,11 @@ steps:
# See: https://golangci-lint.run/
- name: lint
image: golangci/golangci-lint:v1.41.1
+ volumes:
+ - name: go-build-cache
+ path: /root/.cache/go-build
+ - name: golangci-lint-cache
+ path: /root/.cache/golangci-lint
commands:
- golangci-lint run --timeout 5m0s --tests=false --verbose
when:
@@ -23,6 +28,9 @@ steps:
- name: test
image: golang:1.16.4
+ volumes:
+ - name: go-build-cache
+ path: /root/.cache/go-build
environment:
GTS_DB_ADDRESS: postgres
commands:
@@ -49,15 +57,30 @@ steps:
exclude:
- pull_request
-services:
-# We need this postgres service running for the test step.
+# We need a postgres service running for the test step.
# See: https://docs.drone.io/pipeline/docker/syntax/services/
+services:
- name: postgres
image: postgres
environment:
POSTGRES_PASSWORD: postgres
+ when:
+ event:
+ include:
+ - pull_request
+
+# We can speed up builds significantly by caching build artifacts between runs.
+# See: https://docs.drone.io/pipeline/docker/syntax/volumes/host/
+volumes:
+- name: go-build-cache
+ host:
+ path: /drone/gotosocial/go-build
+- name: golangci-lint-cache
+ host:
+ path: /drone/gotosocial/golangci-lint
+
---
kind: signature
-hmac: 888b0a9964be9bddad325a8eab0f54350f3cd36c333564ad4333811b4841b640
+hmac: 9134975e238ab9f92a7f75ccc11279e8d5edddb87f10165ed3c7d23fdd9c8a11
...