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