New version: 0.7.6 #74
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test and Build Kover Report | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
kover-report: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Setup Java JDK | |
uses: actions/setup-java@v3 | |
with: | |
distribution: temurin | |
java-version: 17 | |
cache: 'gradle' | |
- name: Cache Kotlin/Native compiler | |
id: cache-konan | |
uses: actions/cache@v3 | |
with: | |
path: ~/.konan | |
key: ${{ runner.os }}-konan | |
- name: Test | |
run: ./gradlew allTests | |
- name: Build Kover Report | |
if: ${{ github.event_name == 'pull_request' }} | |
run: ./gradlew koverXmlReport | |
- name: Add coverage report to PR | |
if: ${{ github.event_name == 'pull_request' }} | |
id: kover | |
uses: mi-kas/kover-report@v1 | |
with: | |
path: | | |
${{ github.workspace }}/mahjong-utils/build/reports/kover/report.xml | |
${{ github.workspace }}/mahjong-utils-entry/build/reports/kover/report.xml | |
token: ${{ secrets.GITHUB_TOKEN }} | |
title: Code Coverage | |
update-comment: true | |
min-coverage-overall: 80 | |
min-coverage-changed-files: 80 | |
coverage-counter-type: LINE |