Skip to content

Feature/macos native targets #58

Feature/macos native targets

Feature/macos native targets #58

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-latest, 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-latest' }}
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