feat: add build system and integration tests

- Update Makefile with test-coverage and verify targets
- Add build.sh script for cross-platform builds with SHA256 checksums
- Implement integration tests for full workflow (add/list/get/update/export/delete)
- Add config integration test
- Update project state documentation
This commit is contained in:
swanadiva
2026-06-23 14:03:08 +07:00
parent 30b57f6084
commit c2d6aabea0
4 changed files with 229 additions and 7 deletions
+12 -1
View File
@@ -1,4 +1,4 @@
.PHONY: build run test clean lint fmt vet install release help
.PHONY: build run test test-short test-coverage clean fmt vet lint install tidy deps verify release help
# Binary name
BINARY_NAME=hostkeeper
@@ -37,10 +37,17 @@ test:
test-short:
$(GOTEST) ./... -v -short
## test-coverage: Run tests with coverage report
test-coverage:
$(GOTEST) ./... -v -coverprofile=coverage.out -covermode=atomic
$(GOCMD) tool cover -html=coverage.out -o coverage.html
@echo "Coverage report generated: coverage.html"
## clean: Remove build artifacts
clean:
$(GOCLEAN)
rm -rf $(BUILD_DIR)
rm -f coverage.out coverage.html
## fmt: Format all Go files
fmt:
@@ -66,6 +73,10 @@ tidy:
deps:
$(GOCMD) mod download
## verify: Verify module dependencies
verify:
$(GOCMD) mod verify
## release: Build for multiple platforms
release: clean
mkdir -p $(BUILD_DIR)