aboutsummaryrefslogtreecommitdiffstats
path: root/.drone.yml
diff options
context:
space:
mode:
authorsilverwind <me@silverwind.io>2022-03-16 03:50:26 +0100
committerGitHub <noreply@github.com>2022-03-15 22:50:26 -0400
commitfe9626af296f7c7893af8cff88bc4195724bea07 (patch)
tree7a53ba47454d62c52128da1cf9f2ed723af97bbd /.drone.yml
parent6ab4a96855e472f3a8f86b2e7f66a9cc714fa447 (diff)
downloadgitea-fe9626af296f7c7893af8cff88bc4195724bea07.tar.gz
gitea-fe9626af296f7c7893af8cff88bc4195724bea07.zip
Use `go run` for tool dependencies, require go 1.17 (#18874)
This ensures the tools only run in the versions we've tested and it also does not polute PATH with those tools so they are truly isolated. This syntax of `go run` requires go 1.17, so the minimum version is set accordingly. Fixes: https://github.com/go-gitea/gitea/issues/18867 Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Diffstat (limited to '.drone.yml')
-rw-r--r--.drone.yml13
1 files changed, 11 insertions, 2 deletions
diff --git a/.drone.yml b/.drone.yml
index 31706ac213..6e5b3da55e 100644
--- a/.drone.yml
+++ b/.drone.yml
@@ -49,11 +49,14 @@ steps:
GOSUMDB: sum.golang.org
TAGS: bindata sqlite sqlite_unlock_notify
depends_on: [deps-backend]
+ volumes:
+ - name: deps
+ path: /go
- name: lint-backend-windows
image: gitea/test_env:linux-amd64 # https://gitea.com/gitea/test-env
commands:
- - make golangci-lint vet
+ - make golangci-lint-windows vet
environment:
GOPROXY: https://goproxy.cn # proxy.golang.org is blocked in China, this proxy is not
GOSUMDB: sum.golang.org
@@ -61,6 +64,9 @@ steps:
GOOS: windows
GOARCH: amd64
depends_on: [deps-backend]
+ volumes:
+ - name: deps
+ path: /go
- name: lint-backend-gogit
image: gitea/test_env:linux-amd64 # https://gitea.com/gitea/test-env
@@ -71,6 +77,9 @@ steps:
GOSUMDB: sum.golang.org
TAGS: bindata gogit sqlite sqlite_unlock_notify
depends_on: [deps-backend]
+ volumes:
+ - name: deps
+ path: /go
- name: checks-frontend
image: node:16
@@ -100,7 +109,7 @@ steps:
depends_on: [test-frontend]
- name: build-backend-no-gcc
- image: golang:1.16 # this step is kept as the lowest version of golang that we support
+ image: golang:1.17 # this step is kept as the lowest version of golang that we support
pull: always
environment:
GO111MODULE: on