Skip to content

Commit

Permalink
Add problem matcher, upload lint results as artifacts
Browse files Browse the repository at this point in the history
  • Loading branch information
kberzinch committed Apr 20, 2024
1 parent 57d2e7a commit 058020d
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,38 @@ jobs:
echo taplinxOfflineKey=${{ secrets.TAPLINX_OFFLINE_KEY }} >> local.properties
echo sentryDsn=${{ secrets.SENTRY_DSN }} >> local.properties
- name: Add problem matcher for Detekt
run: echo "::add-matcher::ci/detekt/matcher.json"

- name: Build with Gradle
run: ./gradlew build

- name: Upload attendance module lint results HTML report
uses: actions/upload-artifact@v4
with:
name: attendance-lint-results-html
path: attendance/build/reports/lint-results-debug.html
if-no-files-found: warn
retention-days: 1
compression-level: 9
overwrite: false

- name: Upload auth module lint results HTML report
uses: actions/upload-artifact@v4
with:
name: auth-lint-results-html
path: auth/build/reports/lint-results-debug.html
if-no-files-found: warn
retention-days: 1
compression-level: 9
overwrite: false

- name: Upload auth module lint results text report
uses: actions/upload-artifact@v4
with:
name: auth-lint-results-html
path: auth/build/intermediates/lint_intermediate_text_report/debug/lint-results-debug.txt
if-no-files-found: warn
retention-days: 1
compression-level: 9
overwrite: false
16 changes: 16 additions & 0 deletions ci/detekt/matcher.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"problemMatcher": [
{
"owner": "detekt",
"pattern": [
{
"regexp": "^\\/home\\/runner\\/work\\/apiary-mobile\\/apiary-mobile([\\/a-zA-Z-\\\\.]+):(\\d+):\\s+([a-zA-Z]+):\\s+(.+)$",
"file": 1,
"line": 2,
"severity": 3,
"message": 4
}
]
}
]
}

0 comments on commit 058020d

Please sign in to comment.