name: Check Style

on:
  push:
    paths:
      - '**.java'
  pull_request:
    paths:
      - '**.java'

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Set up JDK 11
        uses: actions/setup-java@v4
        with:
          distribution: 'zulu'
          java-version: '11'
          java-package: 'jdk+fx'
      - name: Check style main
        run: ./gradlew checkstyleMain --no-daemon
      - name: Check style test
        run: ./gradlew checkstyleTest --no-daemon
