chore: update test workflow
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
d46cebb906
commit
2ac4d5f8e9
10
Makefile
10
Makefile
|
@ -1,19 +1,23 @@
|
||||||
.PHONY: all clean test
|
.PHONY: all build clean prepare-test test
|
||||||
|
|
||||||
BUILD_DIR = ./build
|
BUILD_DIR = ./build
|
||||||
|
TMP_DIR = ./tmp
|
||||||
APPS := $(notdir $(wildcard ./cmd/*))
|
APPS := $(notdir $(wildcard ./cmd/*))
|
||||||
FLAGS := "-s -w"
|
FLAGS := "-s -w"
|
||||||
|
|
||||||
all:
|
all: build
|
||||||
|
|
||||||
|
build:
|
||||||
$(foreach APP,$(APPS), go build -ldflags=$(FLAGS) -o $(BUILD_DIR)/$(APP) ./cmd/$(APP);)
|
$(foreach APP,$(APPS), go build -ldflags=$(FLAGS) -o $(BUILD_DIR)/$(APP) ./cmd/$(APP);)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -rf $(BUILD_DIR)/*
|
rm -rf $(BUILD_DIR)/*
|
||||||
|
rm -rf $(TMP_DIR)/*
|
||||||
rm -rf *.out
|
rm -rf *.out
|
||||||
|
|
||||||
prepare-test:
|
prepare-test:
|
||||||
git submodule update --init --remote
|
git submodule update --init --remote
|
||||||
|
|
||||||
test:
|
test:
|
||||||
./scripts/prepare_test_repos.sh
|
./scripts/prepare_test_repos.sh $(TMP_DIR)
|
||||||
go test -coverprofile cover.out -v ./...
|
go test -coverprofile cover.out -v ./...
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
set -ex
|
set -ex
|
||||||
declare -A repo_names
|
declare -A repo_names
|
||||||
tmp_dir="./tmp"
|
tmp_dir=${1:-./tmp}
|
||||||
submodules_dir="$tmp_dir/submodules"
|
submodules_dir="$tmp_dir/submodules"
|
||||||
rm -rf $submodules_dir
|
rm -rf $submodules_dir
|
||||||
mkdir -p $submodules_dir
|
mkdir -p $submodules_dir
|
||||||
|
|
Loading…
Reference in New Issue
Block a user