Skip to content

Commit

Permalink
Report SAT Errors with GHA Annotations (openhab#11652)
Browse files Browse the repository at this point in the history
Let's test the GHA annotations for errors also in this repo!

Similar to openhab/openhab-core#2543

Signed-off-by: Wouter Born <github@maindrain.net>
  • Loading branch information
wborn authored and Nemer_Daud committed Jan 28, 2022
1 parent 475f733 commit 8e29f5a
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .github/openhab-compile-problems.json
@@ -0,0 +1,21 @@
{
"problemMatcher": [
{
"owner": "openhab-compile-problems",
"severity": "error",
"pattern": [
{
"regexp": "Failed to execute goal.*Compilation failure"
},
{
"regexp": "^\\[ERROR\\] (.+\\.java):\\[(.+),(.+)\\] (.*)$",
"file": 1,
"line": 2,
"col": 3,
"message": 4,
"loop": true
}
]
}
]
}
13 changes: 13 additions & 0 deletions .github/workflows/ci-build.yml
Expand Up @@ -54,6 +54,11 @@ jobs:
with:
maven-version: ${{ matrix.maven }}

- name: Register Problem Matchers
id: problem_matchers
run: |
echo "::add-matcher::.github/openhab-compile-problems.json"
- name: Get Changed Files
id: files
uses: Ana06/get-changed-files@v2.0.0
Expand Down Expand Up @@ -84,3 +89,11 @@ jobs:
with:
name: sat-summary-report
path: target/summary_report.html

- name: Report SAT Errors as Annotations
uses: ghys/checkstyle-github-action@main
if: ${{ always() && ((steps.build.outcome == 'success') || (steps.build.outcome == 'failure')) }}
with:
title: CheckStyle Violations
path: '**/checkstyle-result.xml'
mode: inline

0 comments on commit 8e29f5a

Please sign in to comment.