Skip to content

Commit

Permalink
feat: add kover for code coverage
Browse files Browse the repository at this point in the history
This commit adds kover to the project for code coverage analysis and integrates it with the CI workflow.

- Adds
 kover dependency and configuration for Android modules.
- Includes a step to generate kover XML reports in the build workflow.
- Utilizes the madrapps/jacoco-report action to display test coverage and enforce minimum coverage thresholds.
- Adjusts the build trigger to run on pull requests instead of pushes
 to the develop branch.
- Reduces the build timeout to 30 minutes.
  • Loading branch information
shinhyo committed Aug 27, 2024
1 parent d51146f commit d6bb96c
Showing 1 changed file with 25 additions and 5 deletions.
30 changes: 25 additions & 5 deletions .github/workflows/Build.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
name: Build

on:
push:
pull_request:
branches:
- develop
pull_request:

concurrency:
group: build-${{ github.ref }}
Expand All @@ -13,7 +12,7 @@ concurrency:
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 60
timeout-minutes: 30

steps:
- name: Checkout
Expand Down Expand Up @@ -51,9 +50,30 @@ jobs:
- name: Check Spotless
run: ./gradlew spotlessCheck --init-script gradle/init.gradle.kts --no-configuration-cache --stacktrace

- name: Upload build reports
- name: UnitTest
run: |
./gradlew testDebugUnitTest --stacktrace
- name: Check Kover
run: |
./gradlew koverXmlReportDebug
- name: Display local test coverage
uses: madrapps/jacoco-report@v1
with:
title: test coverage report
min-coverage-overall: 40
min-coverage-changed-files: 60
update-comment: true
skip-if-no-changes: true
continue-on-error: false
paths: |
${{ github.workspace }}/**/build/reports/kover/reportDebug.xml
token: ${{ secrets.GITHUB_TOKEN }}

- name: Upload lint reports
if: always()
uses: actions/upload-artifact@v3
with:
name: build-reports
path: app/build/reports
path: app/build/reports

0 comments on commit d6bb96c

Please sign in to comment.