summaryrefslogtreecommitdiff
path: root/.drone.yml
diff options
context:
space:
mode:
authorLibravatar Tobi Smethurst <31960611+tsmethurst@users.noreply.github.com>2021-08-15 18:43:08 +0200
committerLibravatar GitHub <noreply@github.com>2021-08-15 18:43:08 +0200
commitff406be68f0fe6fc0b2dae9a091ce164ac039b3f (patch)
tree622473ad500239f890b116f8bd30164b92a7dfc5 /.drone.yml
parentDon't run tests+lint on merge to main (#139) (diff)
downloadgotosocial-ff406be68f0fe6fc0b2dae9a091ce164ac039b3f.tar.xz
Timeline loop fix (#140)
* uwu we made a fucky wucky * uwu we made a fucky wucky * work on timeline fixes a little * fiddle with tests some more * bleep bloop more tests * more tests * update drone yml * update some sturf * make the timeline code a bit lazier * go fmt * fix drone.yml
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
...