diff --git a/Magefile.go b/Magefile.go index ab3c0a1..2421bae 100644 --- a/Magefile.go +++ b/Magefile.go @@ -18,6 +18,11 @@ func init() { } func Test() { + TestNative() + TestMakefile() +} + +func TestMakefile() { Bash(`sudo docker run -ti --rm \ -h host \ --net=bridge \ @@ -40,6 +45,29 @@ func Test() { '`) } +func TestNative() { + Bash(`sudo docker run -ti --rm \ + -h host \ + --net=bridge \ + -v /etc/localtime:/etc/localtime:ro \ + -v ` + GolangVolume + `:/usr/local/go:ro \ + \ + -v /gopath:/gopath:rw \ + -v ${PWD}:/app \ + \ + -e GOPATH=/gopath \ + -e GOCACHE=/gopath/gocache \ + \ + -w /app \ + -u 1000 \ + \ + --entrypoint=/bin/bash \ + \ + ` + ImageName + " -c '" + `\ + go test \ + '`) +} + func TestSnippets() { Bash(`sudo docker run -ti --rm \ -h host \