Feature/day asterisk #62
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: "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 |