From 18cfabdef8c074f7a1999a7dc55d0c4e315e672d Mon Sep 17 00:00:00 2001 From: Alex Walker Date: Tue, 10 Jan 2023 20:25:14 +0100 Subject: [PATCH 1/3] feat: add health checks Signed-off-by: Alex Walker --- int/docker-compose.yml | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/int/docker-compose.yml b/int/docker-compose.yml index 46070ea..645530c 100644 --- a/int/docker-compose.yml +++ b/int/docker-compose.yml @@ -1,8 +1,9 @@ -version: '3' #************************************************************** # integration level test agents * #*************************************************************** +# minor comment +# services: #************************************************************* # agent: acapy agent loaded with plugin * @@ -33,12 +34,24 @@ services: --auto-store-credential --preserve-exchange-records --public-invites + healthcheck: + test: curl -s -o /dev/null -w '%{http_code}' "http://localhost:3001/status/live" | grep "200" > /dev/null + start_period: 30s + interval: 7s + timeout: 5s + retries: 5 echo: image: dbluhm/echo-agent:6c22a88 ports: - "3002:3002" command: --host 0.0.0.0 --port 3002 --log-level debug + healthcheck: + test: nc -z localhost 3002 + start_period: 5s + interval: 1s + timeout: 5s + retries: 5 #************************************************************* # tester: drives tests for acapy_plugin_toolbox in a * @@ -62,5 +75,7 @@ services: - SUITE_HOST=echo - SUITE_PORT=3002 depends_on: - - agent - - echo + agent: + condition: service_healthy + echo: + condition: service_healthy From 17230228a34ab2e66d9c8f282cf75fa7cae06ea4 Mon Sep 17 00:00:00 2001 From: Alex Walker Date: Tue, 10 Jan 2023 11:26:35 -0800 Subject: [PATCH 2/3] fix/code-quality/ubuntu version Change `ubuntu-latest` to `ubuntu--20.04` to support python 3.6+ Signed-off-by: Alex Walker --- .github/workflows/code-quality-check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/code-quality-check.yml b/.github/workflows/code-quality-check.yml index 553a20b..08646b9 100644 --- a/.github/workflows/code-quality-check.yml +++ b/.github/workflows/code-quality-check.yml @@ -15,7 +15,7 @@ env: jobs: format: name: Format and Lint Check - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v2 - name: Set up Python 3.6 From ea9f59154bac8b011ac11b8acd0f60de18e46e7d Mon Sep 17 00:00:00 2001 From: Alex Walker Date: Tue, 10 Jan 2023 11:27:16 -0800 Subject: [PATCH 3/3] fix/tests/ubuntu version Change `ubuntu-latest` to `ubuntu-20.04` to support python 3.6+ Signed-off-by: Alex Walker --- .github/workflows/tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index afbeaa5..968e7a3 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -10,7 +10,7 @@ env: jobs: test: name: Tests - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 strategy: matrix: python-version: [3.6, 3.7, 3.8, 3.9] @@ -52,7 +52,7 @@ jobs: int: name: Integration Tests - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v2 - name: Run integration tests