From 93631bcb0af5d6b17f32762a3f47687414110ac9 Mon Sep 17 00:00:00 2001 From: Softonik Date: Sat, 26 Nov 2022 01:20:04 +0300 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=B0=20mage=20=D0=BA=D0=BE=D0=BC=D0=B0=D0=BD=D0=B4?= =?UTF-8?q?=D0=B0=20=D0=B7=D0=B0=D0=BF=D1=83=D1=81=D0=BA=D0=B0=20=D1=82?= =?UTF-8?q?=D0=B5=D1=81=D1=82=D0=BE=D0=B2=20=D1=80=D0=BE=D0=B4=D0=BD=D1=8B?= =?UTF-8?q?=D0=BC=20=D0=BE=D0=B1=D1=80=D0=B0=D0=B7=D0=BE=D0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Magefile.go | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) 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 \