Skip to content

Commit

Permalink
fix(integration-tests): update docker compose syntax (#1062)
Browse files Browse the repository at this point in the history
## 🧰 Changes

Docker compose v1 was removed from runner-images, and this caused some
workflow jobs to fail
  • Loading branch information
AndriiAndreiev authored Aug 6, 2024
1 parent 9a25e82 commit ecfab05
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:

- name: Cleanup
if: always()
run: docker-compose down
run: docker compose down

build:
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:

- name: Cleanup
if: always()
run: docker-compose down
run: docker compose down

build:
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:

- name: Cleanup
if: always()
run: docker-compose down
run: docker compose down

build:
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:

- name: Cleanup
if: always()
run: docker-compose down
run: docker compose down

build:
name: ${{ matrix.python-version }} on ${{ matrix.os }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:

- name: Cleanup
if: always()
run: docker-compose down
run: docker compose down

build:
runs-on: ubuntu-latest
Expand Down
30 changes: 15 additions & 15 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,23 @@ help: ## Display this help screen
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'

cleanup:
@docker-compose down
@docker compose down

cleanup-failure:
@docker-compose down
@docker compose down
exit 1

##
## .NET
##
test-metrics-dotnet: ## Run Metrics tests against the .NET SDK
docker-compose up --build --detach integration_dotnet_metrics_v6.0
docker compose up --build --detach integration_dotnet_metrics_v6.0
sleep 5
npm run test:integration-metrics || make cleanup-failure
@make cleanup

test-webhooks-dotnet: ## Run webhooks tests against the .NET SDK
docker-compose up --build --detach integration_dotnet_webhooks_v6.0
docker compose up --build --detach integration_dotnet_webhooks_v6.0
npm run test:integration-webhooks || make cleanup-failure
@make cleanup

Expand All @@ -29,22 +29,22 @@ test-webhooks-dotnet: ## Run webhooks tests against the .NET SDK
##

test-metrics-node-express: ## Run Metrics tests against the Node SDK + Express
docker-compose up --build --detach integration_node_express
docker compose up --build --detach integration_node_express
SUPPORTS_HASHING=true npm run test:integration-metrics || make cleanup-failure
@make cleanup

test-webhooks-node-express: ## Run webhooks tests against the Node SDK + Express
docker-compose up --build --detach integration_node_express
docker compose up --build --detach integration_node_express
npm run test:integration-webhooks || make cleanup-failure
@make cleanup

test-metrics-node-fastify: ## Run Metrics tests against the Node SDK + Fastify
docker-compose up --build --detach integration_node_fastify
docker compose up --build --detach integration_node_fastify
SUPPORTS_HASHING=true npm run test:integration-metrics || make cleanup-failure
@make cleanup

test-metrics-node-hapi: ## Run Metrics tests against the Node SDK + hapi
docker-compose up --build --detach integration_node_hapi
docker compose up --build --detach integration_node_hapi
SUPPORTS_HASHING=true npm run test:integration-metrics || make cleanup-failure
@make cleanup

Expand All @@ -53,12 +53,12 @@ test-metrics-node-hapi: ## Run Metrics tests against the Node SDK + hapi
##

test-metrics-php-laravel: ## Run Metrics tests against the PHP SDK + Laravel
docker-compose up --build --detach integration_php_laravel
docker compose up --build --detach integration_php_laravel
SUPPORTS_MULTIPART=true npm run test:integration-metrics || make cleanup-failure
@make cleanup

test-webhooks-php-laravel: ## Run webhooks tests against the PHP SDK + Laravel
docker-compose up --detach integration_php_laravel
docker compose up --detach integration_php_laravel
SUPPORTS_MULTIPART=true npm run test:integration-webhooks || make cleanup-failure
@make cleanup

Expand All @@ -67,17 +67,17 @@ test-webhooks-php-laravel: ## Run webhooks tests against the PHP SDK + Laravel
##

test-metrics-python-django: ## Run Metrics tests against the Python SDK + Django
docker-compose up --build --detach integration_metrics_python_django
docker compose up --build --detach integration_metrics_python_django
npm run test:integration-metrics || make cleanup-failure
@make cleanup

test-metrics-python-flask: ## Run Metrics tests against the Python SDK + Flask
docker-compose up --build --detach integration_python_flask_metrics
docker compose up --build --detach integration_python_flask_metrics
npm run test:integration-metrics || make cleanup-failure
@make cleanup

test-webhooks-python-flask: ## Run webhooks tests against the Python SDK + Flask
docker-compose up --build --detach integration_python_flask_webhooks
docker compose up --build --detach integration_python_flask_webhooks
npm run test:integration-webhooks || make cleanup-failure
@make cleanup

Expand All @@ -91,13 +91,13 @@ test-webhooks-python-flask: ## Run webhooks tests against the Python SDK + Flask
# This is the only thing that works consistently. It's not great but it'll do.

test-metrics-ruby-rails: ## Run Metrics tests against the Ruby SDK + Rails
docker-compose up --build --detach integration_ruby_rails
docker compose up --build --detach integration_ruby_rails
sleep 5
SUPPORTS_HASHING=true npm run test:integration-metrics || make cleanup-failure
@make cleanup

test-webhooks-ruby-rails: ## Run webhooks tests against the Ruby SDK + Rails
docker-compose up --build --detach integration_ruby_rails
docker compose up --build --detach integration_ruby_rails
sleep 5
SUPPORTS_HASHING=true npm run test:integration-webhooks || make cleanup-failure
@make cleanup

0 comments on commit ecfab05

Please sign in to comment.