name: Check Style

on: [push, pull_request]

jobs:
  build:

    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v2
      - name: Checkout submodules
        run: git submodule update --init --recursive
      - name: Set up JDK 11
        uses: actions/setup-java@v1
        with:
          distribution: 'zulu'
          java-version: '11'
          java-package: jdk+fx
      - name: Check style main
        run: ./gradlew checkstyleMain
      - name: Check style test
        run: ./gradlew checkstyleTest
