|
55 | 55 | openidm/startup.sh & |
56 | 56 | timeout 3m bash -c 'until grep -q "OpenIDM ready" openidm/logs/openidm0.log.0 ; do sleep 5; done' || cat openidm/logs/openidm0.log.0 |
57 | 57 | grep -q "OpenIDM ready" openidm/logs/openidm0.log.0 |
58 | | - ! grep "ERROR" openidm/logs/openidm0.log.0 |
59 | | - ! grep "SEVERE" openidm/logs/openidm0.log.0 |
| 58 | + ! grep -E "ERROR|SEVERE|Exception|Throwable" openidm/logs/openidm0.log.0 |
60 | 59 | - name: Test on Windows |
61 | 60 | if: runner.os == 'Windows' |
62 | 61 | run: | |
|
66 | 65 | Start-Sleep -s 180 |
67 | 66 | type logs\openidm0.log.0 |
68 | 67 | findstr "OpenIDM ready" logs\openidm0.log.0 |
69 | | - type logs\openidm0.log.0 | find /c '"ERROR"' | findstr "0" |
70 | | - type logs\openidm0.log.0 | find /c '"SEVERE"' | findstr "0" |
| 68 | + if (Select-String -Path logs\openidm0.log.0 -Pattern 'ERROR|SEVERE|Exception|Throwable' -Quiet) { |
| 69 | + Write-Host "Errors or exceptions detected in openidm0.log.0" |
| 70 | + Select-String -Path logs\openidm0.log.0 -Pattern 'ERROR|SEVERE|Exception|Throwable' |
| 71 | + exit 1 |
| 72 | + } |
71 | 73 | - name: Upload failure artifacts |
72 | 74 | uses: actions/upload-artifact@v7 |
73 | 75 | if: ${{ failure() }} |
@@ -136,8 +138,7 @@ jobs: |
136 | 138 | OPENIDM_OPTS="$OPTS" openidm/startup.sh $ARGS & |
137 | 139 | timeout 3m bash -c 'until grep -q "OpenIDM ready" openidm/logs/openidm0.log.0 ; do sleep 5; done' || cat openidm/logs/openidm0.log.0 |
138 | 140 | grep -q "OpenIDM ready" openidm/logs/openidm0.log.0 |
139 | | - ! grep "ERROR" openidm/logs/openidm0.log.0 |
140 | | - ! grep "SEVERE" openidm/logs/openidm0.log.0 |
| 141 | + ! grep -E "ERROR|SEVERE|Exception|Throwable" openidm/logs/openidm0.log.0 |
141 | 142 | - name: UI Smoke Tests (Playwright) |
142 | 143 | run: | |
143 | 144 | cd e2e |
@@ -170,7 +171,23 @@ jobs: |
170 | 171 | done |
171 | 172 | else |
172 | 173 | echo "openidm/logs directory not found" |
| 174 | + exit 0 |
173 | 175 | fi |
| 176 | + echo "----- Checking logs for errors/exceptions -----" |
| 177 | + status=0 |
| 178 | + while IFS= read -r f; do |
| 179 | + if grep -E -n "ERROR|SEVERE|Exception|Throwable" "$f" > /tmp/log_errors.$$ 2>/dev/null; then |
| 180 | + echo "Found errors/exceptions in $f:" |
| 181 | + cat /tmp/log_errors.$$ |
| 182 | + status=1 |
| 183 | + fi |
| 184 | + rm -f /tmp/log_errors.$$ |
| 185 | + done < <(find openidm/logs -type f) |
| 186 | + if [ "$status" -ne 0 ]; then |
| 187 | + echo "Errors or exceptions detected in openidm logs" |
| 188 | + exit 1 |
| 189 | + fi |
| 190 | + echo "No errors or exceptions detected in openidm logs" |
174 | 191 | build-docker: |
175 | 192 | runs-on: 'ubuntu-latest' |
176 | 193 | services: |
|
0 commit comments