From 058020d94a5f9b60017b129f21a0ea5bb644c4e3 Mon Sep 17 00:00:00 2001 From: Kristaps Berzinch Date: Sat, 20 Apr 2024 14:15:19 -0400 Subject: [PATCH] Add problem matcher, upload lint results as artifacts --- .github/workflows/android.yml | 33 +++++++++++++++++++++++++++++++++ ci/detekt/matcher.json | 16 ++++++++++++++++ 2 files changed, 49 insertions(+) create mode 100644 ci/detekt/matcher.json diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index 40a8ed6..ca1c008 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -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 diff --git a/ci/detekt/matcher.json b/ci/detekt/matcher.json new file mode 100644 index 0000000..174e9df --- /dev/null +++ b/ci/detekt/matcher.json @@ -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 + } + ] + } + ] +} \ No newline at end of file