Skip to content

Feature/kotlin 2.0

Feature/kotlin 2.0 #63

Workflow file for this run

name: "Build and Test"
on:
workflow_dispatch:
workflow_call:
pull_request:
branches:
- 'main'
jobs:
build-and-test:
strategy:
matrix:
os: [macos-13, ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: "Set Up JDK"
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 11
cache: gradle
- name: "Grant execute permission for gradlew"
if: ${{ matrix.os != 'windows-latest' }}
run: chmod +x gradlew
- name: "Build with Gradle"
run: ./gradlew build -x check
shell: bash
- name: "Tests"
if: ${{ matrix.os == 'ubuntu-latest' }}
run: ./gradlew cleanJvmTest jvmTest --tests "com.ucasoft.kcron.*"
- name: "Tests"
if: ${{ matrix.os == 'windows-latest' }}
run: ./gradlew cleanMingwX64Test mingwX64Test --tests "com.ucasoft.kcron.*"
- name: "Tests"
if: ${{ matrix.os == 'macos-13' }}
run: ./gradlew cleanMacosX64Test macosX64Test --tests "com.ucasoft.kcron.*"
- name: "Tests Report"
uses: dorny/test-reporter@v1
if: success() || failure()
with:
name: jUnit Tests
path: '**/build/test-results/*Test/TEST-*.xml'
reporter: java-junit
- name: "Run Coverage"
if: ${{ github.event_name == 'pull_request' }}
run: ./gradlew koverXmlReport
shell: bash
- name: "Coverage Report"
uses: mi-kas/kover-report@v1
if: ${{ github.event_name == 'pull_request' }}
with:
path: |
./kcron-common/build/reports/kover/report.xml
./kcron-core/build/reports/kover/report.xml
token: ${{ secrets.GITHUB_TOKEN }}
title: "Coverage Report"
update-comment: true