Use volumes for linux during testing

This commit is contained in:
Don
2019-01-25 13:10:49 -08:00
parent b959b53632
commit 470770bd18
+5
View File
@@ -9,7 +9,9 @@ local golang_image(os, version) =
{
test(os='linux', arch='amd64', version='')::
local is_windows = windows(os);
local golang = golang_image(os, version);
local volumes = if !is_windows then [{name: 'gopath', path: '/go',}];
{
kind: 'pipeline',
name: test_pipeline_name,
@@ -29,6 +31,7 @@ local golang_image(os, version) =
commands: [
'go vet ./...',
],
volumes: if std.length(volumes) > 0 then volumes,
},
{
name: 'test',
@@ -40,8 +43,10 @@ local golang_image(os, version) =
commands: [
'go test -cover ./...',
],
volumes: if std.length(volumes) > 0 then volumes,
},
],
volumes: if !is_windows then [{name: 'gopath', temp: {}}]
},
build(name, os='linux', arch='amd64', version='')::