Skip to content

Commit

Permalink
chore: use docker-compose v2 in github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
cjuega committed Jan 25, 2024
1 parent d1add1b commit 31d90be
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,26 @@ ifndef DOCKER_COMPOSE
@echo "docker-compose is not available. Please install docker-compose"
@exit 1
endif
ifndef GITHUB_ACTIONS
yarn install --force
else
yarn install --force >/dev/null 2>&1
endif

# Start infrastructure containers in background
.PHONY = start_infra
start_infra:
docker-compose up -d --wait

# Start infrastructure containers in background for CI
.PHONY = start_infra_ci
start_infra_ci:
ifndef GITHUB_ACTIONS
docker-compose up -d --wait dynamodb redis mysql mongo elasticsearch opensearch-node1 opensearch-node2 kafka rabbitmq
else
docker compose up -d --wait dynamodb redis mysql mongo elasticsearch opensearch-node1 opensearch-node2 kafka rabbitmq >/dev/null 2>&1
endif

# Start databases containers in background
.PHONY = start_database
start_database:
Expand All @@ -31,7 +44,7 @@ start_messaging:

# Run tests
.PHONY = test
test: deps start_infra
test: deps start_infra_ci
yarn test
yarn lint

Expand Down

0 comments on commit 31d90be

Please sign in to comment.