github.com/freiheit-com/kuberpult@v1.24.2-0.20240328135542-315d5630abe6/tests/integration-tests/Makefile (about) 1 # This file is part of kuberpult. 2 3 # Kuberpult is free software: you can redistribute it and/or modify 4 # it under the terms of the Expat(MIT) License as published by 5 # the Free Software Foundation. 6 7 # Kuberpult is distributed in the hope that it will be useful, 8 # but WITHOUT ANY WARRANTY; without even the implied warranty of 9 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 # MIT License for more details. 11 12 # You should have received a copy of the MIT License 13 # along with kuberpult. If not, see <https://directory.fsf.org/wiki/License:Expat>. 14 15 # Copyright 2023 freiheit.com 16 17 # NOTE: this will be replaced with the etf-golang makefile 18 19 MAKEFLAGS += --no-builtin-rules 20 21 export CGO_ENABLED=1 22 23 GO := go 24 25 GO_FILES := $(shell find . -type f -name '*.go') 26 PKG_GO_FILES := $(shell find ../../pkg/ -type f -name '*.go') 27 ALL_GO_FILES := $(GO_FILES) $(PKG_GO_FILES) 28 GO_TEST_FILES := $(shell find . -type f -name '*_text.go') 29 30 ifeq ($(patsubst %$(VERSION),,$(IMAGENAME)),) 31 else 32 $(error "$(IMAGENAME) doesn't end with $(VERSION). Please set the correct version.") 33 endif 34 35 build: $(GO_TEST_FILES) 36 $(GO) test $(GO_TEST_ARGS) ./... -c 37 38 build-pr: build 39 40 build-main: build 41 42 .PHONY: cleanup-pr 43 cleanup-pr: 44 45 .PHONY: cleanup-main 46 cleanup-main: 47 48 test: $(ALL_GO_FILES) 49 $(GO) test $(GO_TEST_ARGS) ./... 50 51 all: build test