I was searching for a build system for my Go projects. In the Java world, things look much easier. You have maven and it's so easy to make test/integration test and package the project.
I'm trying to find the solution for starting Redis in docker then run package integration tests and finally stop the Redis.
I don't have problems with the test rule:
go_test(
name = "go_default_test",
srcs = ["person_cache_integration_test.go"],
embed = [":go_default_library"],
deps = [
"//internal/models:go_default_library",
"@com_github_stretchr_testify//assert:go_default_library",
],
)
but how can I start Redis in Docker before this rule and stop Redis in any case after successful or fail tests?
Thanks.