Skip to content
Snippets Groups Projects
Commit 3a41220184cc authored by Florent Aide's avatar Florent Aide
Browse files

CI: try to force the GOPATH in our task command

parent bd9255c9ec9c
No related branches found
No related tags found
No related merge requests found
Pipeline #36326 passed
---
stages:
......@@ -1,7 +2,9 @@
stages:
- test
- test
- lint
- build
unit_tests:
stage: test
image: quay.orus.io/cc/golang:1.17.6
cache:
......@@ -3,6 +6,7 @@
unit_tests:
stage: test
image: quay.orus.io/cc/golang:1.17.6
cache:
key: tooling
paths:
......@@ -8,8 +12,28 @@
paths:
- .gopath/pkg/mod
- .gopath/golangci-cache
- .cache/gocache
- tools/bin
- .gopath/pkg/mod
- .gopath/golangci-cache
- .cache/gocache
- tools/bin
script:
- sh -c "$(curl --location https://taskfile.dev/install.sh)" -- -d -b tools/bin
- tools/bin/task test
lint:
stage: lint
image: quay.orus.io/cc/golang:1.17.6
cache:
key: tooling
paths:
- .gopath/pkg/mod
- .gopath/golangci-cache
- .cache/gocache
- tools/bin
script:
- GOLANGCI_LINT_ARGS="-j 4" GOLANGCI_LINT_CACHE=$CI_PROJECT_DIR/.gopath/golangci-cache tools/bin/task lint
build:
stage: build
image: quay.orus.io/cc/golang:1.17.6
artifacts:
paths:
- build
......@@ -13,5 +37,11 @@
artifacts:
paths:
- build
- docs/_build
cache:
key: tooling
paths:
- .gopath/pkg/mod
- .gopath/golangci-cache
- .cache/gocache
- tools/bin
script:
......@@ -17,4 +47,2 @@
script:
- GO111MODULE=on go get -d -u github.com/go-task/task/v3/cmd/task
- GOLANGCI_LINT_ARGS="-j 4" GOLANGCI_LINT_CACHE=$CI_PROJECT_DIR/.gopath/golangci-cache task lint
- task test
- tools/bin/task build
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment