From efea820c33dc2932e0a64c4b8570b635af14e5f3 Mon Sep 17 00:00:00 2001 From: dustoair <107600816+dustoair@users.noreply.github.com> Date: Sun, 14 Aug 2022 18:13:55 +0800 Subject: [PATCH] test --- .drone.yml | 8 ++++---- Makefile | 6 +++++- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.drone.yml b/.drone.yml index 3a8836e..e3a661b 100644 --- a/.drone.yml +++ b/.drone.yml @@ -15,18 +15,18 @@ clone: disable: true steps: - - name: build + - name: test commands: - - echo build start + - echo test start - date - export PATH=$PATH:/usr/local/go/bin - cd /root - rm -rf IPRegion - git clone https://git.sre.ink/go/IPRegion.git - cd IPRegion - - make build-linux-arm64 + - make test-linux-arm64 - date - - echo build end + - echo test end - name: package commands: - echo package start diff --git a/Makefile b/Makefile index 4be356e..08e7373 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,8 @@ -all: build-linux-arm64 +all: test-linux-arm64 build-linux-arm64 + +test-linux-arm64: + CGO_ENABLED=0 GOOS=linux GOARCH=arm64 GO111MODULE=on go mod tidy + CGO_ENABLED=0 GOOS=linux GOARCH=arm64 GO111MODULE=on go test global/global_test.go build-linux-arm64: CGO_ENABLED=0 GOOS=linux GOARCH=arm64 GO111MODULE=on go mod tidy