feat(ci): add kover for test coverage reporting (#3041)

Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
This commit is contained in:
James Rich 2025-09-10 10:30:47 -05:00 committed by GitHub
parent 72c5284e2e
commit 0659d38438
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 69 additions and 9 deletions

View file

@ -34,7 +34,7 @@ jobs:
# upload_artifacts defaults to true, so no need to explicitly set
secrets:
GRADLE_ENCRYPTION_KEY: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
check-workflow-status:
name: Check Workflow Status
runs-on: ubuntu-latest

View file

@ -9,6 +9,8 @@ on:
required: false
DATADOG_CLIENT_TOKEN:
required: false
CODECOV_TOKEN:
required: false
inputs:
upload_artifacts:
description: 'Whether to upload build and Detekt artifacts'
@ -67,9 +69,17 @@ jobs:
echo "datadogApplicationId=$DATADOG_APPLICATION_ID" >> ./secrets.properties
echo "datadogClientToken=$DATADOG_CLIENT_TOKEN" >> ./secrets.properties
- name: Run Spotless, Detekt, Build, Lint, and Local Tests
run: ./gradlew :app:spotlessCheck :app:detekt :app:lintFdroidDebug :app:lintGoogleDebug :app:assembleDebug :app:testFdroidDebug :app:testGoogleDebug --configuration-cache --scan
run: ./gradlew :app:spotlessCheck :app:detekt :app:lintFdroidDebug :app:lintGoogleDebug :app:assembleDebug koverXmlReport --configuration-cache --scan
env:
VERSION_CODE: ${{ env.VERSION_CODE }}
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: meshtastic/Meshtastic-Android
files: app/build/reports/kover/xml/report.xml
- name: Upload F-Droid debug artifact
if: ${{ inputs.upload_artifacts }}
uses: actions/upload-artifact@v4

View file

@ -70,4 +70,4 @@ jobs:
with:
name: android-test-reports-api-${{ matrix.api-level }}
path: app/build/outputs/androidTest-results/
retention-days: 14
retention-days: 14