From f7777b35ba43aa1777dc83fff0bedc7a39888a2b Mon Sep 17 00:00:00 2001 From: Daniel Ziegler Date: Thu, 4 Jul 2024 11:51:27 +0200 Subject: [PATCH] Add sleep to integration test --- .github/workflows/integration.yaml | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/.github/workflows/integration.yaml b/.github/workflows/integration.yaml index 8b17542..113c395 100644 --- a/.github/workflows/integration.yaml +++ b/.github/workflows/integration.yaml @@ -16,20 +16,25 @@ jobs: steps: - uses: actions/checkout@v4 - - name: install-library + - name: install azure-functions-core-tools shell: bash - run: | - npm ci - - name: install-test-function + run: npm install -g azure-functions-core-tools@4 --unsafe-perm true + - name: install dependencies shell: bash - working-directory: ./example - run: | - npm ci && npm install -g azure-functions-core-tools@4 --unsafe-perm true + run: npm ci - name: start-test-function shell: bash working-directory: ./example run: | npm run start & + + echo "Waiting until function launched on 8080..." + + while ! nc -z 127.0.0.1 8080; do + sleep 1 + done + + echo "Function launched" - name: test-function shell: bash run: |