From 3a7fb955c6ea1037a4880da826a290f8576a53ad Mon Sep 17 00:00:00 2001 From: MariusBaldovin Date: Mon, 21 Oct 2024 10:37:28 +0100 Subject: [PATCH] updated package.yml to start testrun and check if successfully started --- .github/workflows/package.yml | 42 +++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/.github/workflows/package.yml b/.github/workflows/package.yml index 99bfa4e96..eae056eca 100644 --- a/.github/workflows/package.yml +++ b/.github/workflows/package.yml @@ -49,6 +49,20 @@ jobs: - name: Install package shell: bash {0} run: sudo apt install ./testrun*.deb + - name: Start testrun + shell: bash {0} + run: sudo testrun > >(tee testrun_output.log) 2>&1 & + - name: Verify testrun started + shell: bash {0} + run: | + sleep 5 + if grep -q "API waiting for requests" testrun_output.log; then + echo "Testrun started successfully." + else + echo "Testrun did not start correctly." + cat testrun_output.log + exit 1 + fi install_package_22: permissions: {} @@ -69,6 +83,20 @@ jobs: - name: Install package shell: bash {0} run: sudo apt install ./testrun*.deb + - name: Start testrun + shell: bash {0} + run: sudo testrun > >(tee testrun_output.log) 2>&1 & + - name: Verify testrun started + shell: bash {0} + run: | + sleep 5 + if grep -q "API waiting for requests" testrun_output.log; then + echo "Testrun started successfully." + else + echo "Testrun did not start correctly." + cat testrun_output.log + exit 1 + fi install_package_24: permissions: {} @@ -89,3 +117,17 @@ jobs: - name: Install package shell: bash {0} run: sudo apt install ./testrun*.deb + - name: Start testrun + shell: bash {0} + run: sudo testrun > >(tee testrun_output.log) 2>&1 & + - name: Verify testrun started + shell: bash {0} + run: | + sleep 5 + if grep -q "API waiting for requests" testrun_output.log; then + echo "Testrun started successfully." + else + echo "Testrun did not start correctly." + cat testrun_output.log + exit 1 + fi