From 0ae1b64ab8c03fa905de75f3cc0a86ab8f0b67a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rasmus=20Skytte=20Randl=C3=B8v?= Date: Wed, 7 Feb 2024 09:47:41 +0100 Subject: [PATCH] fix(code-coverage): Fix awk syntax error (Postgres) --- .github/workflows/code-coverage.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/code-coverage.yaml b/.github/workflows/code-coverage.yaml index cbc2ca0a..a8a2c6d5 100644 --- a/.github/workflows/code-coverage.yaml +++ b/.github/workflows/code-coverage.yaml @@ -182,18 +182,18 @@ jobs: if: always() uses: jwalton/gh-docker-logs@v1 with: - dest: './logs-docs' + dest: '${{ runner.workspace }}/logs-docker' - name: Check docker logs for PostgreSQL ERRORs if: always() run: | ## -------------------------------------------------------------------- - log=$(find ./logs-docs/ -name 'postgres*.log') + log=$(find ${{ runner.workspace }}/logs-docker/ -name '*postgres*.log') - awk '/ERROR:|STATEMENT:/{flag=1;next}/LOG:|^[^ ]|^ $/{flag=0}flag && {print $0}' $log + awk '/(ERROR:|STATEMENT:)/{flag=1}/LOG:|^[A-Z]/{flag=0}flag {print $0}' $log - # Throw errors on ERRORs - grep -qv "ERROR" $log || { echo "PostgreSQL backend threw ERRORs"; exit 1; } + # Throw error if ERRORs are found + grep -q "ERROR:" $log && { echo "PostgreSQL ERRORs found"; exit 1; } code-coverage-mssql: name: 🧪 Tests (SQL Server 2019)