Skip to content

Commit

Permalink
fix(code-coverage): Fix awk syntax error (Postgres)
Browse files Browse the repository at this point in the history
  • Loading branch information
RasmusSkytte committed Feb 7, 2024
1 parent 0ef6f62 commit 0ae1b64
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/code-coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 0ae1b64

Please sign in to comment.