Skip to content

chore: Add test class validation for runner helper #88

chore: Add test class validation for runner helper

chore: Add test class validation for runner helper #88

Workflow file for this run

name: Build with Gradle
on:
push:
branches: [ 'main' ]
pull_request:
branches: [ 'main' ]
jobs:
build:
runs-on: ubuntu-22.04
permissions:
actions: write
contents: read
steps:
- uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3
- name: Set up JDK
uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 # v4.2.1
with:
java-version-file: '.java-version'
distribution: 'temurin'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@750cdda3edd6d51b7fdfc069d2e2818cf3c44f4c # v3.3.1
- name: Build with Gradle Wrapper
run: ./gradlew build koverXmlReport publish
env:
JUNIT5_ROBOLECTRIC_EXTENSION_MAVEN_USERNAME: '${{ secrets.JUNIT5_ROBOLECTRIC_EXTENSION_MAVEN_USERNAME }}'
JUNIT5_ROBOLECTRIC_EXTENSION_MAVEN_PASSWORD: '${{ secrets.JUNIT5_ROBOLECTRIC_EXTENSION_MAVEN_PASSWORD }}'
JUNIT5_ROBOLECTRIC_EXTENSION_GPG_SIGNING_KEY: '${{ secrets.JUNIT5_ROBOLECTRIC_EXTENSION_GPG_SIGNING_KEY }}'
JUNIT5_ROBOLECTRIC_EXTENSION_GPG_SIGNING_PASSWORD: '${{ secrets.JUNIT5_ROBOLECTRIC_EXTENSION_GPG_SIGNING_PASSWORD }}'
- name: Upload coverage report
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
if: ${{ hashFiles('build/reports/kover/report.xml') != '' }}
with:
name: kover-report
path: ${{ github.workspace }}/build/reports/kover/report.xml
retention-days: 5
kover:
runs-on: ubuntu-22.04
needs:
- build
permissions:
actions: read
checks: write
contents: read
pull-requests: write
steps:
- name: Download coverage report
uses: actions/download-artifact@9c19ed7fe5d278cd354c7dfd5d3b88589c7e2395 # v4.1.6
with:
name: kover-report
- name: Comment branch coverage report to PR
uses: mi-kas/kover-report@0befa22b2291fedc1eefd9ff8f9d5e3a9412168c # v1.8
if: ${{ hashFiles('report.xml') != '' }}
with:
path: ${{ github.workspace }}/report.xml
title: Branch Coverage
update-comment: true
min-coverage-overall: 60
min-coverage-changed-files: 70
coverage-counter-type: BRANCH
- name: Comment line coverage report to PR
uses: mi-kas/kover-report@0befa22b2291fedc1eefd9ff8f9d5e3a9412168c # v1.8
if: ${{ hashFiles('report.xml') != '' }}
with:
path: ${{ github.workspace }}/report.xml
title: Line Coverage
update-comment: true
min-coverage-overall: 60
min-coverage-changed-files: 70
coverage-counter-type: LINE