update gitignore, makefile and readme
This commit is contained in:
parent
4eef117330
commit
7c3ec901cd
1
.gitignore
vendored
1
.gitignore
vendored
@ -1 +1,2 @@
|
|||||||
.sqlfluff
|
.sqlfluff
|
||||||
|
*.out
|
||||||
|
|||||||
27
Makefile
27
Makefile
@ -20,3 +20,30 @@ migrateup:
|
|||||||
# Run all services
|
# Run all services
|
||||||
run:
|
run:
|
||||||
go run ./service_a/server/main.go & go run ./service_b/server/main.go
|
go run ./service_a/server/main.go & go run ./service_b/server/main.go
|
||||||
|
|
||||||
|
.PHONY: test
|
||||||
|
# Run all tests with coverage
|
||||||
|
test:
|
||||||
|
@echo "Running tests for service_a..."
|
||||||
|
cd $(SERVICE_A) && go test ./... -coverprofile=../service_a_coverage.out
|
||||||
|
@echo "Running tests for service_b..."
|
||||||
|
cd $(SERVICE_B) && go test ./... -coverprofile=../service_b_coverage.out
|
||||||
|
@echo "\nCoverage reports generated:"
|
||||||
|
@echo " - service_a_coverage.out"
|
||||||
|
@echo " - service_b_coverage.out"
|
||||||
|
|
||||||
|
.PHONY: coverage
|
||||||
|
# View coverage reports in browser
|
||||||
|
coverage:
|
||||||
|
@echo "Opening service_a coverage report..."
|
||||||
|
cd $(SERVICE_A) && go tool cover -html=../service_a_coverage.out
|
||||||
|
@echo "Opening service_b coverage report..."
|
||||||
|
cd $(SERVICE_B) && go tool cover -html=../service_b_coverage.out
|
||||||
|
|
||||||
|
.PHONY: coverage-func
|
||||||
|
# Show coverage summary in terminal
|
||||||
|
coverage-func:
|
||||||
|
@echo "Service A Coverage:"
|
||||||
|
cd $(SERVICE_A) && go tool cover -func=../service_a_coverage.out
|
||||||
|
@echo "\nService B Coverage:"
|
||||||
|
cd $(SERVICE_B) && go tool cover -func=../service_b_coverage.out
|
||||||
|
|||||||
@ -8,6 +8,12 @@ Compilar todos los servicios e iniciar los contenedores Docker.
|
|||||||
|
|
||||||
`docker compose --env-file <path/to/file> up --build`
|
`docker compose --env-file <path/to/file> up --build`
|
||||||
|
|
||||||
|
## Decisiones técnica
|
||||||
|
|
||||||
|
1. Hablar sobre la función normalize, repetición de parse float. Justificar que se puede haber extraído a una función, pero ambas opciones son válidas (YAGNI)
|
||||||
|
|
||||||
|
2. Hablar sobre las sobreabstracciones que se hacen en el código. Hay que busca un punto de equlibrio entre abstraer o ser explícito.
|
||||||
|
|
||||||
## Entorno desarrollo
|
## Entorno desarrollo
|
||||||
|
|
||||||
Linux Fedora 41 6.16.11-200.fc42.x86_64
|
Linux Fedora 41 6.16.11-200.fc42.x86_64
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user