From 7306010ea3acb08a006be0cd3d379f2c738b762f Mon Sep 17 00:00:00 2001 From: Leendert de Borst Date: Mon, 10 Jun 2024 17:29:52 +0200 Subject: [PATCH] Update docker-compose-build.yml --- .github/workflows/docker-compose-build.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docker-compose-build.yml b/.github/workflows/docker-compose-build.yml index 47dd6b17c..02885dc6d 100644 --- a/.github/workflows/docker-compose-build.yml +++ b/.github/workflows/docker-compose-build.yml @@ -23,7 +23,7 @@ jobs: run: | # Wait for a few seconds sleep 5 - - name: Test if localhost:80 responds + - name: Test if localhost:80 (WASM app) responds run: | # Test if the service on localhost:80 responds http_code=$(curl -s -o /dev/null -w "%{http_code}" http://localhost:80) @@ -33,3 +33,13 @@ jobs: else echo "Service responded with 200 OK" fi + - name: Test if localhost:81 (WebApi) responds + run: | + # Test if the service on localhost:81 responds + http_code=$(curl -s -o /dev/null -w "%{http_code}" http://localhost:81) + if [ "$http_code" -ne 200 ] && [ "$http_code" -ne 404 ]; then + echo "Service did not respond with expected 200 OK or 404 Not Found" + exit 1 + else + echo "Service responded with $http_code" + fi