1
0
mirror of https://blitiri.com.ar/repos/chasquid synced 2025-12-17 14:37:02 +00:00

cirrus: Allow the testing user to write to $GOPATH

Cirrus CI caches the module directory inside $GOPATH so it can be shared
between test runs, to speed them up.

However, it is currently created as root, which causes new entries to
fail since they run under the "testing" user.

This patch fixes that problem by making the "testing" user own the
entire $GOPATH, which includes the module directory.
This commit is contained in:
Alberto Bertogli
2020-05-17 09:54:26 +01:00
parent 4c28efcb20
commit f296bc31a8

View File

@@ -17,6 +17,8 @@ linux_task:
folder: $GOPATH/pkg/mod
get_script: |
useradd --create-home --user-group testing
chown -R testing:testing $GOPATH/
su testing -c "go mod download"
su testing -c "go get ./..."
build_script: |
su testing -c "go build ./..."