From 70e083bae0c46ac01c00cf75330a207e280e6679 Mon Sep 17 00:00:00 2001 From: Akhil Mohan Date: Thu, 8 Feb 2024 22:20:01 +0530 Subject: [PATCH] feat: open api-diff added detach mode --- .github/workflows/check-api-for-breaking-changes.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/check-api-for-breaking-changes.yml b/.github/workflows/check-api-for-breaking-changes.yml index 8bead10ce..f6acd084c 100644 --- a/.github/workflows/check-api-for-breaking-changes.yml +++ b/.github/workflows/check-api-for-breaking-changes.yml @@ -30,7 +30,7 @@ jobs: - name: Start postgres and redis run: touch .env && docker-compose -f docker-compose.pg.yml up -d db redis - name: Start the server - run: docker run --name infisical-api -p 4000:4000 -e DB_CONNECTION_URI=$DB_CONNECTION_URI -e REDIS_URL=$REDIS_URL -e JWT_AUTH_SECRET=$JWT_AUTH_SECRET --entrypoint '/bin/sh' infisical-api -c "npm run migration:latest && ls && node dist/main.mjs" + run: docker run --name infisical-api -d -p 4000:4000 -e DB_CONNECTION_URI=$DB_CONNECTION_URI -e REDIS_URL=$REDIS_URL -e JWT_AUTH_SECRET=$JWT_AUTH_SECRET --entrypoint '/bin/sh' infisical-api -c "npm run migration:latest && ls && node dist/main.mjs" env: REDIS_URL: redis://172.17.0.1:6379 DB_CONNECTION_URI: postgres://infisical:infisical@172.17.0.1:5432/infisical?sslmode=disable @@ -38,7 +38,7 @@ jobs: - name: Install openapi api diff run: npm install -g openapi-diff - name: Wait for containers to be stable - run: timeout 180s sh -c 'until docker ps | grep infisical-api | grep -q healthy; do echo "Waiting for container to be healthy..."; sleep 2; done' + run: timeout 60s sh -c 'until docker ps | grep infisical-api | grep -q healthy; do echo "Waiting for container to be healthy..."; sleep 2; done' - name: Get changes made in API id: openapi-diff run: openapi-diff https://app.infisical.com/api/docs/json http://localhost:4000/api/docs/json