Skip to content

Test macOS on pull requests and master #1

Test macOS on pull requests and master

Test macOS on pull requests and master #1

Workflow file for this run

name: Gradle Tests
on:
pull_request:
workflow_dispatch:
push:
branches:
- master
concurrency:
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
# Cancel if there is a new update only on pull requests
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
test-matrix:
strategy:
matrix:
os: [ ubuntu-latest, windows-latest, macos-latest ]
javaVersion: [ 8, 11, 17, 21 ]
# Enable fail-fast on pull requests, to avoid clogging up CI
fail-fast: ${{ github.event_name == 'pull_request' }}
runs-on: ${{ matrix.os }}
steps:
- name: Set longpaths support for Windows
if: matrix.os == 'windows-latest'
# Avoid failing tests on Windows with "cannot create directory at X. Filename too long"
# This command will fail if run on a Linux build agent with "could not lock config file: Permission denied"
run: git config --system core.longpaths true
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 17
- uses: gradle/actions/setup-gradle@v3
with:
gradle-home-cache-cleanup: true
- name: Run tests
run: >
./gradlew test --stacktrace --continue
"-Porg.jetbrains.dokka.javaToolchain.testLauncher=${{ matrix.javaVersion }}"