From d5386f0247f5da8c7436d2ed6441c3d7321b9f3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rasmus=20Skytte=20Randl=C3=B8v?= Date: Thu, 8 Feb 2024 12:58:49 +0100 Subject: [PATCH] fix(code-coverage): Exit with success if no ERROR: (Postgres) --- .github/workflows/code-coverage.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/code-coverage.yaml b/.github/workflows/code-coverage.yaml index a8a2c6d5..33ce518f 100644 --- a/.github/workflows/code-coverage.yaml +++ b/.github/workflows/code-coverage.yaml @@ -188,12 +188,16 @@ jobs: if: always() run: | ## -------------------------------------------------------------------- + set -x log=$(find ${{ runner.workspace }}/logs-docker/ -name '*postgres*.log') awk '/(ERROR:|STATEMENT:)/{flag=1}/LOG:|^[A-Z]/{flag=0}flag {print $0}' $log # Throw error if ERRORs are found - grep -q "ERROR:" $log && { echo "PostgreSQL ERRORs found"; exit 1; } + if echo "$log" | grep -q "ERROR:"; then + echo "PostgreSQL ERRORs found" + exit 1 + fi code-coverage-mssql: name: 🧪 Tests (SQL Server 2019)