mirror of
https://github.com/drone-plugins/drone-webhook.git
synced 2026-06-04 18:24:05 +08:00
Use volumes for linux during testing
This commit is contained in:
@@ -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='')::
|
||||
|
||||
Reference in New Issue
Block a user