-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
executable file
Β·2016 lines (1715 loc) Β· 82.6 KB
/
Copy pathMakefile
File metadata and controls
executable file
Β·2016 lines (1715 loc) Β· 82.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
.PHONY: all build build-legacy-memory test run fmt lint security-scan security-scan-all deps-scan secrets-scan gosec-baseline security-scan-snyk security-scan-sonarqube security-scan-trivy security-scan-gosec security-scan-go security-scan-stop security-scan-semgrep security-scan-kics security-scan-grype security-scan-container security-scan-iac security-report docker-build docker-run docker-stop docker-clean docker-logs docker-test docker-dev docker-prod coverage docker-clean-all install-deps help docs check-deps test-all test-all-docker container-detect container-build container-start container-stop container-logs container-status container-test podman-build podman-run podman-stop podman-logs podman-clean podman-full test-no-skip test-all-must-pass test-performance test-performance-bench test-challenges test-coverage-100 benchmark-baseline benchmark-check audit audit-json audit-coverage audit-todo audit-skip audit-deadcode audit-concurrency test-submodule-sync
EXCLUDE_DIRS := cli_agents MCP MCP-Servers
TEST_PACKAGES := ./cmd/... ./internal/... ./pkg/... ./tests/... ./challenges/...
# Resource limits per Constitution Rule 15 (30-40% host resources)
RESOURCE_PREFIX := nice -n 19 ionice -c 3
GO_TEST_FLAGS := -p 1
export GOMAXPROCS := 2
# P1.5-WP4: API-key loader. Sourced before test/build recipes so credentials
# from $HOME/api_keys.sh (or .env fallback) are available in the env.
# Guard ensures recipe still works when the loader is absent.
LOAD_KEYS := if [ -f scripts/load_api_keys.sh ]; then . scripts/load_api_keys.sh; fi
all: fmt vet lint test build
# =============================================================================
# BUILD TARGETS
# =============================================================================
build:
@echo "π¨ Building HelixAgent..."
go build -mod=mod -ldflags="-w -s" -o bin/helixagent ./cmd/helixagent
build-debug:
@echo "π Building HelixAgent (debug)..."
go build -mod=mod -gcflags="all=-N -l" -o bin/helixagent-debug ./cmd/helixagent
build-legacy-memory:
@echo "Building HelixAgent (legacy memory, no HelixMemory)..."
go build -mod=mod -tags nohelixmemory -ldflags="-w -s" -o bin/helixagent ./cmd/helixagent
build-all:
@echo "π¨ Building all architectures..."
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -mod=mod -ldflags="-w -s" -o bin/helixagent-linux-amd64 ./cmd/helixagent
CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -mod=mod -ldflags="-w -s" -o bin/helixagent-linux-arm64 ./cmd/helixagent
CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -mod=mod -ldflags="-w -s" -o bin/helixagent-darwin-amd64 ./cmd/helixagent
CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 go build -mod=mod -ldflags="-w -s" -o bin/helixagent-darwin-arm64 ./cmd/helixagent
CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -mod=mod -ldflags="-w -s" -o bin/helixagent-windows-amd64.exe ./cmd/helixagent
# =============================================================================
# RELEASE BUILD TARGETS
# =============================================================================
release:
@echo "π¦ Building release for helixagent (all platforms)..."
@./scripts/build/build-release.sh --app helixagent --all-platforms
release-all:
@echo "π¦ Building releases for ALL apps (all platforms)..."
@./scripts/build/build-all-releases.sh
release-helixagent:
@echo "π¦ Building release: helixagent..."
@./scripts/build/build-release.sh --app helixagent --all-platforms
release-api:
@echo "π¦ Building release: api..."
@./scripts/build/build-release.sh --app api --all-platforms
release-grpc-server:
@echo "π¦ Building release: grpc-server..."
@./scripts/build/build-release.sh --app grpc-server --all-platforms
release-cognee-mock:
@echo "π¦ Building release: cognee-mock..."
@./scripts/build/build-release.sh --app cognee-mock --all-platforms
release-sanity-check:
@echo "π¦ Building release: sanity-check..."
@./scripts/build/build-release.sh --app sanity-check --all-platforms
release-mcp-bridge:
@echo "π¦ Building release: mcp-bridge..."
@./scripts/build/build-release.sh --app mcp-bridge --all-platforms
release-generate-constitution:
@echo "π¦ Building release: generate-constitution..."
@./scripts/build/build-release.sh --app generate-constitution --all-platforms
release-force:
@echo "π¦ Force rebuilding ALL apps (all platforms)..."
@./scripts/build/build-all-releases.sh --force
release-clean:
@echo "π§Ή Cleaning release artifacts (keeping version data)..."
@for app in helixagent api grpc-server cognee-mock sanity-check mcp-bridge generate-constitution; do \
rm -rf "releases/$$app/"; \
done
@echo "β
Release artifacts cleaned"
release-clean-all:
@echo "π§Ή Cleaning ALL release data (artifacts + version tracking)..."
@for app in helixagent api grpc-server cognee-mock sanity-check mcp-bridge generate-constitution; do \
rm -rf "releases/$$app/"; \
done
@rm -f releases/.version-data/*.version-code releases/.version-data/*.last-hash
@echo "β
All release data cleaned"
release-info:
@echo "π Release Build Status"
@echo ""
@for app in helixagent api grpc-server cognee-mock sanity-check mcp-bridge generate-constitution; do \
vc="0"; hash="none"; \
if [ -f "releases/.version-data/$$app.version-code" ]; then \
vc=$$(cat "releases/.version-data/$$app.version-code"); \
fi; \
if [ -f "releases/.version-data/$$app.last-hash" ]; then \
hash=$$(cat "releases/.version-data/$$app.last-hash" | head -c 16); \
fi; \
printf " %-24s version-code: %-4s hash: %s\n" "$$app" "$$vc" "$$hash"; \
done
release-builder-image:
@echo "π³ Building release builder container image..."
@RUNTIME=$$(command -v docker 2>/dev/null || command -v podman 2>/dev/null); \
if [ -z "$$RUNTIME" ]; then echo "β No container runtime found"; exit 1; fi; \
$$RUNTIME build -f docker/build/Dockerfile.builder -t helixagent-builder:latest .
@echo "β
Builder image ready"
# =============================================================================
# CI/CD CONTAINER BUILD SYSTEM
# =============================================================================
.PHONY: ci-all ci-go ci-mobile ci-web ci-desktop ci-integration ci-report ci-build-images ci-clean
CI_COMPOSE_CMD = $(shell command -v docker >/dev/null 2>&1 && echo "docker compose" || echo "podman-compose")
CI_IS_DOCKER = $(shell command -v docker >/dev/null 2>&1 && echo "yes" || echo "no")
# Helper: run CI phase with proper compose flags
# Docker supports --abort-on-container-exit --exit-code-from
# Podman-compose needs: up -d, wait, inspect exit code, down
define run_ci_phase
@if [ "$(CI_IS_DOCKER)" = "yes" ]; then \
$(CI_COMPOSE_CMD) -f docker-compose.ci.yml --profile $(1) up --build --abort-on-container-exit --exit-code-from $(2); \
else \
$(CI_COMPOSE_CMD) -f docker-compose.ci.yml --profile $(1) build; \
$(CI_COMPOSE_CMD) -f docker-compose.ci.yml --profile $(1) up -d; \
echo "Waiting for $(2) to complete..."; \
podman wait $(2) >/dev/null 2>&1 || true; \
echo "Streaming logs from $(2):"; \
podman logs $(2) 2>&1; \
EXIT_CODE=$$(podman inspect --format '{{.State.ExitCode}}' $(2) 2>/dev/null || echo 1); \
echo "$(2) exited with code $$EXIT_CODE"; \
$(CI_COMPOSE_CMD) -f docker-compose.ci.yml --profile $(1) down 2>/dev/null || true; \
exit $$EXIT_CODE; \
fi
@$(CI_COMPOSE_CMD) -f docker-compose.ci.yml --profile $(1) down 2>/dev/null || true
endef
ci-build-images: ## Build all CI container images
@echo "Building CI container images..."
$(CI_COMPOSE_CMD) -f docker-compose.ci.yml --profile go-ci --profile mobile-ci --profile web-ci --profile desktop-ci --profile integration --profile report build
@echo "CI images ready"
ci-go: ## Phase 1: Go builds + tests + integration services
@echo "=== Phase 1: Go CI ==="
$(call run_ci_phase,go-ci,ci-go-builder)
ci-mobile: ## Phase 2: Mobile builds + Robolectric + emulator E2E
@echo "=== Phase 2: Mobile CI ==="
$(call run_ci_phase,mobile-ci,ci-mobile-builder)
ci-web: ## Phase 3: Web builds + Playwright + Lighthouse
@echo "=== Phase 3: Web CI ==="
$(call run_ci_phase,web-ci,ci-web-builder)
ci-desktop: ## Phase 4: Desktop builds (Electron/Tauri)
@echo "=== Phase 4: Desktop CI ==="
$(call run_ci_phase,desktop-ci,ci-desktop-builder)
ci-integration: ## Phase 5: Fullβstack integration tests
@echo "=== Phase 5: Integration CI ==="
$(call run_ci_phase,integration,ci-integration-runner)
ci-report: ## Aggregate reports from all phases
@echo "=== CI Report Aggregation ==="
$(call run_ci_phase,report,ci-reporter)
ci-all: ci-go ci-mobile ci-web ci-desktop ci-integration ci-report ## Run all CI phases + report
@echo "=== CI Complete ==="
@echo "Reports: reports/summary.html, reports/results.json"
@echo "Releases: releases/"
ci-clean: ## Remove CI containers, networks, volumes
$(CI_COMPOSE_CMD) -f docker-compose.ci.yml --profile go-ci --profile mobile-ci --profile web-ci --profile desktop-ci --profile integration --profile report down -v --remove-orphans 2>/dev/null || true
@echo "CI cleanup complete"
# =============================================================================
# RUN TARGETS
# =============================================================================
run:
@echo "π Running HelixAgent..."
go run ./cmd/helixagent/main.go
run-dev:
@echo "π§ Running HelixAgent in development mode..."
GIN_MODE=debug go run ./cmd/helixagent/main.go
# =============================================================================
# TEST TARGETS
# =============================================================================
test:
@echo "π§ͺ Running tests..."
@$(LOAD_KEYS); \
if nc -z localhost $${POSTGRES_PORT:-15432} 2>/dev/null && nc -z localhost $${REDIS_PORT:-16379} 2>/dev/null; then \
echo "β
Infrastructure available - running full tests"; \
DB_HOST=localhost DB_PORT=$${POSTGRES_PORT:-15432} DB_USER=helixagent DB_PASSWORD=helixagent123 DB_NAME=helixagent_db \
DATABASE_URL="postgres://helixagent:helixagent123@localhost:$${POSTGRES_PORT:-15432}/helixagent_db?sslmode=disable" \
REDIS_HOST=localhost REDIS_PORT=$${REDIS_PORT:-16379} REDIS_PASSWORD=helixagent123 \
$(RESOURCE_PREFIX) go test -v $(GO_TEST_FLAGS) $(TEST_PACKAGES); \
else \
echo "β οΈ Infrastructure not available - running unit tests only"; \
echo " Run './bin/helixagent' first for proper container orchestration"; \
echo ""; \
$(RESOURCE_PREFIX) go test -v $(GO_TEST_FLAGS) -short $(TEST_PACKAGES); \
fi
# Auto-start infrastructure if not running (supports Docker and Podman)
ensure-test-infra:
@echo "π Checking test infrastructure..."
@INFRA_NEEDED=false; \
if ! nc -z localhost $${POSTGRES_PORT:-15432} 2>/dev/null; then \
INFRA_NEEDED=true; \
fi; \
if ! nc -z localhost $${REDIS_PORT:-16379} 2>/dev/null; then \
INFRA_NEEDED=true; \
fi; \
if [ "$$INFRA_NEEDED" = "true" ]; then \
echo "π³ Starting test infrastructure..."; \
$(MAKE) test-infra-auto-start || { \
echo ""; \
echo "β οΈ WARNING: Could not start test infrastructure."; \
echo " Tests requiring PostgreSQL/Redis will be skipped."; \
echo ""; \
echo " To fix Podman rootless issue, run as root:"; \
echo " echo 'milosvasic:100000:65536' >> /etc/subuid"; \
echo " echo 'milosvasic:100000:65536' >> /etc/subgid"; \
echo " Then run: podman system migrate"; \
echo ""; \
exit 0; \
}; \
fi
@echo "β
Test infrastructure check complete"
# Auto-start with Docker/Podman detection (supports compose and direct container run)
test-infra-auto-start:
@echo "π Detecting container runtime..."
@if command -v docker &> /dev/null && docker info &> /dev/null 2>&1; then \
echo "π³ Using Docker..."; \
docker compose -f docker-compose.test.yml up -d postgres redis 2>/dev/null || \
docker-compose -f docker-compose.test.yml up -d postgres redis 2>/dev/null || \
$(MAKE) test-infra-direct-start; \
elif command -v podman &> /dev/null; then \
echo "π¦ Using Podman..."; \
if command -v podman-compose &> /dev/null; then \
podman-compose -f docker-compose.test.yml up -d postgres redis; \
else \
echo "π¦ Starting containers directly with Podman..."; \
$(MAKE) test-infra-direct-start; \
fi; \
else \
echo "β No container runtime found. Install Docker or Podman."; \
exit 1; \
fi
@echo "β³ Waiting for services to be ready..."
@sleep 5
@for i in 1 2 3 4 5 6 7 8 9 10; do \
nc -z localhost $${POSTGRES_PORT:-15432} 2>/dev/null && break; \
echo " Waiting for PostgreSQL... ($$i/10)"; \
sleep 2; \
done
@for i in 1 2 3 4 5; do \
nc -z localhost $${REDIS_PORT:-16379} 2>/dev/null && break; \
echo " Waiting for Redis... ($$i/5)"; \
sleep 1; \
done
@echo "β
Test infrastructure started"
# Direct container start (fallback when compose is not available)
# Uses fully qualified image names for Podman compatibility
# Uses --userns=host for Podman to bypass subuid issues
test-infra-direct-start:
@echo "π¦ Starting containers directly..."
@# Detect runtime and set options
@RUNTIME="$$(command -v docker 2>/dev/null || command -v podman 2>/dev/null)"; \
if [ -z "$$RUNTIME" ]; then echo "β No container runtime found"; exit 1; fi; \
echo "Using: $$RUNTIME"; \
# Set Podman-specific options \
EXTRA_OPTS=""; \
if echo "$$RUNTIME" | grep -q podman; then \
EXTRA_OPTS="--userns=host"; \
echo "Using Podman with --userns=host mode"; \
fi; \
# Create network if not exists \
$$RUNTIME network create helixagent-test-net 2>/dev/null || true; \
# Stop and remove existing containers \
$$RUNTIME rm -f helixagent-test-postgres helixagent-test-redis 2>/dev/null || true; \
# Start PostgreSQL (using fully qualified name for Podman) \
echo "π Starting PostgreSQL..."; \
$$RUNTIME run -d --name helixagent-test-postgres $$EXTRA_OPTS \
--network helixagent-test-net \
-p $${POSTGRES_PORT:-15432}:5432 \
-e POSTGRES_DB=helixagent_db \
-e POSTGRES_USER=helixagent \
-e POSTGRES_PASSWORD=helixagent123 \
docker.io/library/postgres:15-alpine || exit 1; \
# Start Redis (using fully qualified name for Podman) \
echo "π΄ Starting Redis..."; \
$$RUNTIME run -d --name helixagent-test-redis $$EXTRA_OPTS \
--network helixagent-test-net \
-p $${REDIS_PORT:-16379}:6379 \
docker.io/library/redis:7-alpine redis-server --requirepass helixagent123 --appendonly yes || exit 1; \
echo "β
Containers started"
# Stop direct containers
test-infra-direct-stop:
@RUNTIME="$$(command -v docker 2>/dev/null || command -v podman 2>/dev/null)"; \
if [ -n "$$RUNTIME" ]; then \
$$RUNTIME rm -f helixagent-test-postgres helixagent-test-redis 2>/dev/null || true; \
$$RUNTIME network rm helixagent-test-net 2>/dev/null || true; \
echo "β
Test containers stopped"; \
fi
test-coverage:
@echo "π Running tests with coverage..."
$(RESOURCE_PREFIX) go test -v $(GO_TEST_FLAGS) -race -coverprofile=coverage.out ./...
go tool cover -func=coverage.out
go tool cover -html=coverage.out -o coverage.html
@echo "π Coverage report generated: coverage.html"
test-coverage-100:
@echo "π Running tests with 100% coverage requirement..."
@$(RESOURCE_PREFIX) go test -v $(GO_TEST_FLAGS) -race -coverprofile=coverage.out ./...
@coverage=$$(go tool cover -func=coverage.out | grep total | awk '{print $$3}' | sed 's/%//'); \
if [ $$(echo "$$coverage < 100" | bc -l) -eq 1 ]; then \
echo "β Coverage is $$coverage%, required 100%"; \
exit 1; \
else \
echo "β
Coverage is $$coverage%"; \
fi
go tool cover -html=coverage.out -o coverage.html
test-no-skip:
@echo "π Checking for unconditionally disabled tests..."
@# Only flag unconditional t.Skip() calls at function start without conditions
@SKIPPED=$$(grep -rn "^\s*t\.Skip\(\"" ./tests/ --include="*.go" 2>/dev/null | grep -v "short\|integration\|infra\|server\|provider\|env\|condition" | wc -l); \
if [ "$$SKIPPED" -gt 0 ]; then \
echo "β Found $$SKIPPED unconditionally skipped tests"; \
grep -rn "^\s*t\.Skip\(\"" ./tests/ --include="*.go" 2>/dev/null | grep -v "short\|integration\|infra\|server\|provider\|env\|condition"; \
exit 1; \
fi
@echo "β
No unconditionally disabled tests found"
test-all-must-pass:
@echo "π§ͺ Running all tests (none can fail)..."
@$(RESOURCE_PREFIX) go test -v $(GO_TEST_FLAGS) -failfast $(TEST_PACKAGES) 2>&1 | tee test_output.log; \
if grep -q "FAIL" test_output.log; then \
echo "β Some tests failed"; \
rm -f test_output.log; \
exit 1; \
fi
@rm -f test_output.log
@echo "β
All tests passed"
test-performance:
@echo "π Running performance tests..."
@$(RESOURCE_PREFIX) go test -v $(GO_TEST_FLAGS) -timeout 180s ./tests/unit/concurrency/...
@$(RESOURCE_PREFIX) go test -v $(GO_TEST_FLAGS) -timeout 180s ./tests/unit/events/...
@$(RESOURCE_PREFIX) go test -v $(GO_TEST_FLAGS) -timeout 180s ./tests/unit/cache/...
@$(RESOURCE_PREFIX) go test -v $(GO_TEST_FLAGS) -timeout 180s ./tests/unit/http/...
@echo "β
Performance tests completed"
test-performance-bench:
@echo "π Running performance benchmarks..."
@$(RESOURCE_PREFIX) go test $(GO_TEST_FLAGS) -bench=. -benchmem ./internal/concurrency/...
@$(RESOURCE_PREFIX) go test $(GO_TEST_FLAGS) -bench=. -benchmem ./internal/events/...
@$(RESOURCE_PREFIX) go test $(GO_TEST_FLAGS) -bench=. -benchmem ./internal/cache/...
@echo "β
Performance benchmarks completed"
test-challenges:
@echo "π Running performance challenges..."
@./challenges/scripts/performance_baseline_challenge.sh
@./challenges/scripts/parallel_execution_challenge.sh
@./challenges/scripts/lazy_loading_challenge.sh
@./challenges/scripts/event_driven_challenge.sh
@./challenges/scripts/mcp_connectivity_challenge.sh
@./challenges/scripts/stress_resilience_challenge.sh
@echo "β
All performance challenges passed"
test-unit:
@echo "π§ͺ Running unit tests..."
$(RESOURCE_PREFIX) go test -v $(GO_TEST_FLAGS) ./internal/... -short
test-submodule-sync:
@echo "π§ͺ Running submodule sync tests..."
$(RESOURCE_PREFIX) go test -v -mod=mod $(GO_TEST_FLAGS) ./tests/integration/... -run "TestSubmoduleSync" -short
test-integration:
@echo "π§ͺ Running integration tests with Docker dependencies..."
@./scripts/run-integration-tests.sh --package ./internal/services/...
test-integration-verbose:
@echo "π§ͺ Running integration tests (verbose)..."
@./scripts/run-integration-tests.sh --verbose --package ./internal/services/...
test-all:
@echo "π§ͺ Running ALL tests with full infrastructure (no skipping)..."
@./scripts/run_all_tests.sh
test-complete:
@echo "π§ͺ Running COMPLETE test suite (all 6 types) with full infrastructure..."
@./scripts/run_complete_test_suite.sh --verbose --coverage
test-complete-keep:
@echo "π§ͺ Running COMPLETE test suite (keeping containers for debugging)..."
@./scripts/run_complete_test_suite.sh --verbose --coverage --keep
test-infra-start:
@echo "β οΈ WARNING: Manual container startup is deprecated. Use './bin/helixagent' instead."
@echo "π³ Starting test infrastructure..."
@./scripts/deploy-containers.sh docker-compose.test.yml postgres redis mock-llm
test-infra-stop:
@echo "β οΈ WARNING: Manual container stop is deprecated. Use './bin/helixagent' and Ctrl-C instead."
@echo "π³ Stopping test infrastructure..."
@source ./scripts/container-runtime.sh 2>/dev/null || true; \
if [ -z "$$COMPOSE_CMD" ]; then \
if command -v docker &> /dev/null && docker info &> /dev/null 2>&1; then \
COMPOSE_CMD="docker compose"; \
elif command -v podman-compose &> /dev/null; then \
COMPOSE_CMD="podman-compose"; \
else \
COMPOSE_CMD="docker compose"; \
fi; \
fi; \
$$COMPOSE_CMD -f docker-compose.test.yml down
@echo "β
Test infrastructure stopped"
test-infra-clean:
@echo "π§Ή Cleaning test infrastructure (including volumes)..."
@source ./scripts/container-runtime.sh 2>/dev/null || true; \
if [ -z "$$COMPOSE_CMD" ]; then \
if command -v docker &> /dev/null && docker info &> /dev/null 2>&1; then \
COMPOSE_CMD="docker compose"; \
elif command -v podman-compose &> /dev/null; then \
COMPOSE_CMD="podman-compose"; \
else \
COMPOSE_CMD="docker compose"; \
fi; \
fi; \
$$COMPOSE_CMD -f docker-compose.test.yml down -v --remove-orphans
@echo "β
Test infrastructure cleaned"
test-infra-logs:
@echo "π Showing test infrastructure logs..."
@source ./scripts/container-runtime.sh 2>/dev/null || true; \
if [ -z "$$COMPOSE_CMD" ]; then \
if command -v docker &> /dev/null && docker info &> /dev/null 2>&1; then \
COMPOSE_CMD="docker compose"; \
elif command -v podman-compose &> /dev/null; then \
COMPOSE_CMD="podman-compose"; \
else \
COMPOSE_CMD="docker compose"; \
fi; \
fi; \
$$COMPOSE_CMD -f docker-compose.test.yml logs -f
test-infra-status:
@echo "π Test infrastructure status:"
@source ./scripts/container-runtime.sh 2>/dev/null || true; \
if [ -z "$$COMPOSE_CMD" ]; then \
if command -v docker &> /dev/null && docker info &> /dev/null 2>&1; then \
COMPOSE_CMD="docker compose"; \
elif command -v podman-compose &> /dev/null; then \
COMPOSE_CMD="podman-compose"; \
else \
COMPOSE_CMD="docker compose"; \
fi; \
fi; \
$$COMPOSE_CMD -f docker-compose.test.yml ps
# =============================================================================
# FULL TEST INFRASTRUCTURE (includes Kafka, RabbitMQ, MinIO, Iceberg, Qdrant)
# =============================================================================
test-infra-full-start:
@echo "π³ Starting FULL test infrastructure (all services)..."
@./scripts/start-full-test-infra.sh all
test-infra-full-start-basic:
@echo "π³ Starting basic test infrastructure (PostgreSQL, Redis, Mock LLM)..."
@./scripts/start-full-test-infra.sh basic
test-infra-full-start-messaging:
@echo "π³ Starting messaging test infrastructure (+ Kafka, RabbitMQ)..."
@./scripts/start-full-test-infra.sh messaging
test-infra-full-start-bigdata:
@echo "π³ Starting bigdata test infrastructure (+ MinIO, Iceberg, Qdrant)..."
@./scripts/start-full-test-infra.sh bigdata
test-infra-full-stop:
@echo "π³ Stopping FULL test infrastructure..."
@./scripts/stop-full-test-infra.sh
test-with-full-infra:
@echo "π§ͺ Running tests with FULL infrastructure..."
@$(MAKE) test-infra-full-start
@echo ""
@echo "β³ Waiting for all services to stabilize..."
@sleep 5
@source .env.test 2>/dev/null || true && \
DB_HOST=localhost DB_PORT=$${POSTGRES_PORT:-15432} DB_USER=helixagent DB_PASSWORD=helixagent123 DB_NAME=helixagent_db \
DATABASE_URL="postgres://helixagent:helixagent123@localhost:$${POSTGRES_PORT:-15432}/helixagent_db?sslmode=disable" \
REDIS_HOST=localhost REDIS_PORT=$${REDIS_PORT:-16379} REDIS_PASSWORD=helixagent123 \
REDIS_URL="redis://:helixagent123@localhost:$${REDIS_PORT:-16379}" \
KAFKA_BROKERS=localhost:9092 KAFKA_BROKER=localhost:9092 \
RABBITMQ_HOST=localhost RABBITMQ_PORT=5672 RABBITMQ_USER=helixagent RABBITMQ_PASSWORD=helixagent123 \
RABBITMQ_URL="amqp://helixagent:helixagent123@localhost:5672/" \
MINIO_ENDPOINT=localhost:9000 MINIO_ACCESS_KEY=minioadmin MINIO_SECRET_KEY=minioadmin123 MINIO_USE_SSL=false \
ICEBERG_CATALOG_URI=http://localhost:8181 \
QDRANT_HOST=localhost QDRANT_PORT=6333 \
MOCK_LLM_URL=http://localhost:$${MOCK_LLM_PORT:-18081} MOCK_LLM_ENABLED=true \
CLAUDE_API_KEY=mock-api-key CLAUDE_BASE_URL=http://localhost:$${MOCK_LLM_PORT:-18081}/v1 \
DEEPSEEK_API_KEY=mock-api-key DEEPSEEK_BASE_URL=http://localhost:$${MOCK_LLM_PORT:-18081}/v1 \
GEMINI_API_KEY=mock-api-key GEMINI_BASE_URL=http://localhost:$${MOCK_LLM_PORT:-18081}/v1 \
QWEN_API_KEY=mock-api-key QWEN_BASE_URL=http://localhost:$${MOCK_LLM_PORT:-18081}/v1 \
ZAI_API_KEY=mock-api-key ZAI_BASE_URL=http://localhost:$${MOCK_LLM_PORT:-18081}/v1 \
OLLAMA_BASE_URL=http://localhost:$${MOCK_LLM_PORT:-18081} \
JWT_SECRET=test-jwt-secret-key-for-testing \
CI=true FULL_TEST_MODE=true \
$(RESOURCE_PREFIX) go test -v $(GO_TEST_FLAGS) ./... -timeout 600s -cover
@echo ""
@echo "β
Tests completed with FULL infrastructure!"
test-integration-full:
@echo "π§ͺ Running integration tests with FULL infrastructure..."
@$(MAKE) test-infra-full-start
@echo ""
@source .env.test 2>/dev/null || true && \
$(RESOURCE_PREFIX) go test -v $(GO_TEST_FLAGS) ./tests/integration/... -timeout 600s
@echo ""
@echo "β
Integration tests completed!"
# =============================================================================
# Container Harness Integration Tests (Real Containers via Container Adapter)
# =============================================================================
test-integration-containers:
@echo "π³ Running integration tests with Container Harness..."
@echo " This will boot real containers via the Containers module adapter"
@echo ""
@$(RESOURCE_PREFIX) go test -v $(GO_TEST_FLAGS) ./tests/integration/... \
-run "Container" \
-tags=integration \
-timeout 600s
@echo ""
@echo "β
Container integration tests completed!"
test-integration-containers-short:
@echo "π³ Running container integration tests (short mode)..."
@$(RESOURCE_PREFIX) go test $(GO_TEST_FLAGS) ./tests/integration/... \
-run "Container" \
-tags=integration \
-timeout 300s
@echo "β
Container tests completed!"
test-with-infra:
@echo "β οΈ WARNING: This target uses manual container startup. Use './bin/helixagent' for proper container orchestration."
@echo "π§ͺ Running tests with infrastructure..."
@$(MAKE) test-infra-start
@echo ""
@DB_HOST=localhost DB_PORT=$${POSTGRES_PORT:-15432} DB_USER=helixagent DB_PASSWORD=helixagent123 DB_NAME=helixagent_db \
DATABASE_URL="postgres://helixagent:helixagent123@localhost:$${POSTGRES_PORT:-15432}/helixagent_db?sslmode=disable" \
REDIS_HOST=localhost REDIS_PORT=$${REDIS_PORT:-16379} REDIS_PASSWORD=helixagent123 \
REDIS_URL="redis://:helixagent123@localhost:$${REDIS_PORT:-16379}" \
MOCK_LLM_URL=http://localhost:$${MOCK_LLM_PORT:-18081} MOCK_LLM_ENABLED=true \
CLAUDE_API_KEY=mock-api-key CLAUDE_BASE_URL=http://localhost:$${MOCK_LLM_PORT:-18081}/v1 \
DEEPSEEK_API_KEY=mock-api-key DEEPSEEK_BASE_URL=http://localhost:$${MOCK_LLM_PORT:-18081}/v1 \
GEMINI_API_KEY=mock-api-key GEMINI_BASE_URL=http://localhost:$${MOCK_LLM_PORT:-18081}/v1 \
QWEN_API_KEY=mock-api-key QWEN_BASE_URL=http://localhost:$${MOCK_LLM_PORT:-18081}/v1 \
ZAI_API_KEY=mock-api-key ZAI_BASE_URL=http://localhost:$${MOCK_LLM_PORT:-18081}/v1 \
OLLAMA_BASE_URL=http://localhost:$${MOCK_LLM_PORT:-18081} \
JWT_SECRET=test-jwt-secret-key-for-testing \
CI=true FULL_TEST_MODE=true \
$(RESOURCE_PREFIX) go test -v $(GO_TEST_FLAGS) ./... -timeout 300s -cover
@echo ""
@echo "β
Tests completed!"
test-all-docker:
@echo "π³ Starting test infrastructure and running all tests..."
@docker compose -f docker-compose.test.yml up -d postgres redis mock-llm
@echo "β³ Waiting for services..."
@sleep 10
@DB_HOST=localhost DB_PORT=5432 DB_USER=helixagent DB_PASSWORD=helixagent123 DB_NAME=helixagent_db \
REDIS_HOST=localhost REDIS_PORT=6379 REDIS_PASSWORD=helixagent123 \
MOCK_LLM_URL=http://localhost:8081 MOCK_LLM_ENABLED=true \
CLAUDE_API_KEY=mock CLAUDE_BASE_URL=http://localhost:8081/v1 \
DEEPSEEK_API_KEY=mock DEEPSEEK_BASE_URL=http://localhost:8081/v1 \
GEMINI_API_KEY=mock GEMINI_BASE_URL=http://localhost:8081/v1 \
QWEN_API_KEY=mock QWEN_BASE_URL=http://localhost:8081/v1 \
ZAI_API_KEY=mock ZAI_BASE_URL=http://localhost:8081/v1 \
OLLAMA_BASE_URL=http://localhost:8081 \
CI=true $(RESOURCE_PREFIX) go test -v $(GO_TEST_FLAGS) ./... -timeout 300s
@docker compose -f docker-compose.test.yml down
test-integration-coverage:
@echo "π§ͺ Running integration tests with coverage..."
@./scripts/run-integration-tests.sh --coverage --package ./internal/services/...
test-integration-keep:
@echo "π§ͺ Running integration tests (keep containers)..."
@./scripts/run-integration-tests.sh --keep --package ./internal/services/...
test-integration-all:
@echo "π§ͺ Running all tests with Docker dependencies..."
@./scripts/run-integration-tests.sh --coverage
test-integration-old:
@echo "π§ͺ Running legacy integration tests..."
$(RESOURCE_PREFIX) go test -v $(GO_TEST_FLAGS) ./tests/integration
test-e2e:
@echo "π§ͺ Running end-to-end tests..."
$(RESOURCE_PREFIX) go test -v $(GO_TEST_FLAGS) ./tests/e2e
test-security:
@echo "π Running security tests..."
$(RESOURCE_PREFIX) go test -v $(GO_TEST_FLAGS) ./tests/security
test-pentest:
@echo "π Running penetration tests..."
$(RESOURCE_PREFIX) go test -v $(GO_TEST_FLAGS) -tags pentest ./tests/pentest/...
test-performance-full:
@echo "π Running performance benchmarks and load tests..."
$(RESOURCE_PREFIX) go test -v $(GO_TEST_FLAGS) -tags performance -bench=. -benchmem ./tests/performance/...
test-stress:
@echo "β‘ Running stress tests..."
$(RESOURCE_PREFIX) go test -v $(GO_TEST_FLAGS) ./tests/stress
test-chaos:
@echo "π Running chaos tests..."
$(RESOURCE_PREFIX) go test -v $(GO_TEST_FLAGS) ./tests/challenge
test-all-types:
@echo "π§ͺ Running all 6 test types with full infrastructure..."
@./scripts/run_complete_test_suite.sh --verbose
test-all-types-coverage:
@echo "π§ͺ Running all 6 test types with full infrastructure and coverage..."
@./scripts/run_complete_test_suite.sh --verbose --coverage
# Individual test types with infrastructure
test-type-unit:
@echo "π§ͺ Running unit tests with infrastructure..."
@./scripts/run_complete_test_suite.sh --type unit --verbose
test-type-integration:
@echo "π§ͺ Running integration tests with infrastructure..."
@./scripts/run_complete_test_suite.sh --type integration --verbose
test-type-e2e:
@echo "π§ͺ Running E2E tests with infrastructure..."
@./scripts/run_complete_test_suite.sh --type e2e --verbose
test-type-security:
@echo "π Running security tests with infrastructure..."
@./scripts/run_complete_test_suite.sh --type security --verbose
test-type-stress:
@echo "β‘ Running stress tests with infrastructure..."
@./scripts/run_complete_test_suite.sh --type stress --verbose
test-type-chaos:
@echo "π Running chaos tests with infrastructure..."
@./scripts/run_complete_test_suite.sh --type chaos --verbose
test-bench:
@echo "β‘ Running benchmark tests..."
$(RESOURCE_PREFIX) go test $(GO_TEST_FLAGS) -bench=. -benchmem ./...
test-race:
@echo "π Running race condition tests..."
$(RESOURCE_PREFIX) go test $(GO_TEST_FLAGS) -race ./...
test-automation:
@echo "π€ Running full automation test suite..."
$(RESOURCE_PREFIX) go test -v $(GO_TEST_FLAGS) -timeout 600s ./tests/automation/...
test-automation-verbose:
@echo "π€ Running full automation test suite (verbose)..."
./scripts/run_full_automation.sh --verbose
test-automation-coverage:
@echo "π€ Running full automation test suite with coverage..."
./scripts/run_full_automation.sh --verbose --coverage
# =============================================================================
# CODE QUALITY TARGETS
# =============================================================================
fmt:
@echo "β¨ Formatting code..."
@for pkg in $$(go list ./... 2>/dev/null); do \
case "$$pkg" in \
*cli_agents*|*MCP*|*MCP-Servers*) \
echo "Skipping $$pkg" >&2; \
continue ;; \
*) go fmt $$pkg ;; \
esac; \
done
vet:
@echo "π Running go vet..."
@for pkg in $$(go list ./... 2>/dev/null); do \
case "$$pkg" in \
*cli_agents*|*MCP*|*MCP-Servers*) \
echo "Skipping $$pkg" >&2; \
continue ;; \
*) go vet $$pkg ;; \
esac; \
done
lint:
@echo "π Running linter..."
@if command -v golangci-lint >/dev/null 2>&1; then \
golangci-lint run --enable errcheck,govet --tests=false --max-issues-per-linter=100 ./internal/...; \
else \
echo "β οΈ golangci-lint not installed. Install with: curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b \$$(go env GOPATH)/bin"; \
fi
security-scan:
@echo "π Running comprehensive security scan (all scanners)..."
@echo "π Note: This includes Gosec, Trivy, Snyk, and Go static analysis"
@echo "π For SonarQube, use 'make security-scan-sonarqube'"
@./scripts/security-scan.sh all
# Phase 4 additions β dedicated deps and secrets scan targets.
# These run non-interactively and never start containers or require sudo.
# Reports land in reports/security/ as timestamped markdown + SARIF.
deps-scan:
@echo "π Running dependency vulnerability scan (govulncheck)..."
@./scripts/security/deps-scan.sh
secrets-scan:
@echo "π Running secrets scan (gitleaks)..."
@./scripts/security/secrets-scan.sh
gosec-baseline:
@echo "π Regenerating gosec baseline (.gosec-baseline.json)..."
@GOMAXPROCS=2 nice -n 19 gosec -quiet -fmt=json -out=.gosec-baseline.json ./... || true
@echo "β Baseline refreshed β commit .gosec-baseline.json to lock current state."
security-scan-all:
@echo "π Running ALL security scanners (including SonarQube)..."
@./scripts/security-scan.sh all
@echo ""
@echo "π Starting SonarQube server (this may take 2-3 minutes)..."
@./scripts/security-scan.sh start-sonar
@echo "π Running SonarQube analysis..."
@./scripts/security-scan.sh sonarqube || { \
echo "β οΈ SonarQube scan failed or timed out. Continuing..."; \
echo "π You can run SonarQube separately with: make security-scan-sonarqube"; \
}
security-scan-snyk:
@echo "π Running Snyk vulnerability scanner..."
@./scripts/security-scan.sh snyk
security-scan-sonarqube:
@echo "π Running SonarQube code analysis..."
@echo "π Starting SonarQube server (this may take 2-3 minutes)..."
@./scripts/security-scan.sh start-sonar
@echo "π Running SonarQube analysis..."
@./scripts/security-scan.sh sonarqube
security-scan-trivy:
@echo "π Running Trivy vulnerability scanner..."
@./scripts/security-scan.sh trivy
security-scan-gosec:
@echo "π Running Gosec Go security checker..."
@./scripts/security-scan.sh gosec
security-scan-go:
@echo "π Running Go static analysis (vet, staticcheck)..."
@./scripts/security-scan.sh go
security-scan-stop:
@echo "π Stopping security scanning services..."
@./scripts/security-scan.sh stop
security-scan-semgrep:
@echo "π Running Semgrep pattern-based security scanner..."
@mkdir -p reports/security
@if command -v docker >/dev/null 2>&1; then \
docker run --rm -v "$(PWD):/app:ro" -v "$(PWD)/reports/security:/reports" returntocorp/semgrep:latest \
--config auto --json --output /reports/semgrep-report.json --metrics off /app; \
elif command -v podman >/dev/null 2>&1; then \
podman run --rm -v "$(PWD):/app:ro" -v "$(PWD)/reports/security:/reports" returntocorp/semgrep:latest \
--config auto --json --output /reports/semgrep-report.json --metrics off /app; \
else \
echo "β οΈ Docker/Podman not found. Install Docker or Podman to use Semgrep."; \
fi
security-scan-kics:
@echo "π Running KICS Infrastructure-as-Code scanner..."
@mkdir -p reports/security
@if command -v docker >/dev/null 2>&1; then \
docker run --rm -v "$(PWD):/app:ro" -v "$(PWD)/reports/security:/reports" checkmarx/kics:latest \
scan -p /app -o /reports --report-formats json --ignore-on-exit all --silent; \
elif command -v podman >/dev/null 2>&1; then \
podman run --rm -v "$(PWD):/app:ro" -v "$(PWD)/reports/security:/reports" checkmarx/kics:latest \
scan -p /app -o /reports --report-formats json --ignore-on-exit all --silent; \
else \
echo "β οΈ Docker/Podman not found. Install Docker or Podman to use KICS."; \
fi
security-scan-grype:
@echo "π Running Grype vulnerability scanner..."
@mkdir -p reports/security
@if command -v docker >/dev/null 2>&1; then \
docker run --rm -v "$(PWD):/app:ro" -v "$(PWD)/reports/security:/reports" anchore/grype:latest \
dir:/app -o json --file /reports/grype-report.json; \
elif command -v podman >/dev/null 2>&1; then \
podman run --rm -v "$(PWD):/app:ro" -v "$(PWD)/reports/security:/reports" anchore/grype:latest \
dir:/app -o json --file /reports/grype-report.json; \
else \
echo "β οΈ Docker/Podman not found. Install Docker or Podman to use Grype."; \
fi
security-scan-container:
@echo "π Scanning container images with Trivy..."
@if command -v trivy >/dev/null 2>&1; then \
trivy image --severity HIGH,CRITICAL helixagent:latest; \
else \
echo "β οΈ Trivy not found. Install Trivy to scan container images."; \
fi
security-scan-iac:
@echo "π Scanning Infrastructure-as-Code files..."
@$(MAKE) security-scan-kics
security-report:
@echo "π Generating consolidated security report..."
@mkdir -p reports/security
@echo "# Security Scan Report - $$(date +%Y-%m-%d)" > reports/security/consolidated-report.md
@echo "" >> reports/security/consolidated-report.md
@echo "## Scan Summary" >> reports/security/consolidated-report.md
@echo "" >> reports/security/consolidated-report.md
@if [ -f reports/security/gosec-report.json ]; then \
echo "- Gosec: $$(cat reports/security/gosec-report.json | jq '.Stats.found | length // 0' 2>/dev/null || echo 'N/A') issues"; \
fi
@if [ -f reports/security/trivy-report.json ]; then \
echo "- Trivy: $$(cat reports/security/trivy-report.json | jq '.Results | length // 0' 2>/dev/null || echo 'N/A') findings"; \
fi
@if [ -f reports/security/semgrep-report.json ]; then \
echo "- Semgrep: $$(cat reports/security/semgrep-report.json | jq '.results | length // 0' 2>/dev/null || echo 'N/A') findings"; \
fi
@echo "" >> reports/security/consolidated-report.md
@echo "## Full Reports" >> reports/security/consolidated-report.md
@echo "- Gosec: reports/security/gosec-report.json" >> reports/security/consolidated-report.md
@echo "- Trivy: reports/security/trivy-report.json" >> reports/security/consolidated-report.md
@echo "- Semgrep: reports/security/semgrep-report.json" >> reports/security/consolidated-report.md
@echo "- KICS: reports/security/results.json" >> reports/security/consolidated-report.md
@echo "- Grype: reports/security/grype-report.json" >> reports/security/consolidated-report.md
@echo "β
Report generated: reports/security/consolidated-report.md"
sbom:
@echo "π Generating SBOM (Software Bill of Materials)..."
@./scripts/generate-sbom.sh
# =============================================================================
# DOCKER TARGETS
# =============================================================================
docker-build:
@echo "π³ Building Docker image..."
docker build -t helixagent:latest .
docker-build-prod:
@echo "π³ Building production Docker image..."
docker build --target=production -t helixagent:prod .
docker-run:
@echo "π³ Starting HelixAgent with Docker..."
docker compose up -d
docker-stop:
@echo "π³ Stopping HelixAgent..."
docker compose down
docker-logs:
@echo "π Showing Docker logs..."
docker compose logs -f
docker-clean:
@echo "π§Ή Cleaning Docker containers..."
docker compose down -v --remove-orphans
docker-clean-all:
@echo "π§Ή Cleaning all Docker resources..."
docker compose down -v --remove-orphans
docker system prune -f
docker volume prune -f
docker-test:
@echo "π§ͺ Running tests in Docker..."
docker compose -f docker-compose.test.yml up --build -d
sleep 10
docker compose -f docker-compose.test.yml exec helixagent go test ./...
docker compose -f docker-compose.test.yml down
docker-dev:
@echo "π§ͺ Starting development environment..."
docker compose --profile dev up -d
docker-prod:
@echo "π Starting production environment..."
docker compose --profile prod up -d
docker-full:
@echo "π Starting full environment..."
docker compose --profile full up -d
docker-monitoring:
@echo "π Starting monitoring stack..."
docker compose --profile monitoring up -d
docker-ai:
@echo "π€ Starting AI services..."
docker compose --profile ai up -d
# =============================================================================
# CONTAINER RUNTIME TARGETS (Docker/Podman)
# =============================================================================
container-detect:
@echo "π Detecting container runtime..."
@./scripts/container-runtime.sh
container-build:
@echo "π¨ Building container image..."
@./scripts/container-runtime.sh build
container-start:
@echo "π Starting services..."
@./scripts/container-runtime.sh start
container-stop:
@echo "βΉοΈ Stopping services..."
@./scripts/container-runtime.sh stop
container-logs:
@echo "π Showing logs..."
@./scripts/container-runtime.sh logs
container-status:
@echo "π Checking status..."
@./scripts/container-runtime.sh status
container-test:
@echo "π§ͺ Running container compatibility tests..."
@./tests/container/container_runtime_test.sh
# Podman-specific targets
podman-build:
@echo "π¦ Building with Podman..."
podman build -t helixagent:latest .
podman-run:
@echo "π¦ Running with Podman Compose..."
podman-compose up -d
podman-stop:
@echo "π¦ Stopping Podman services..."
podman-compose down
podman-logs:
@echo "π Showing Podman logs..."
podman-compose logs -f
podman-clean:
@echo "π§Ή Cleaning Podman containers..."
podman-compose down -v --remove-orphans
podman-full:
@echo "π¦ Starting full Podman environment..."
podman-compose --profile full up -d
# =============================================================================
# COMPREHENSIVE INFRASTRUCTURE AUTO-START TARGETS
# =============================================================================