name: Checkstyle

on: pull_request

jobs:
  checkstyle_job:
    runs-on: ubuntu-latest
    name: Checkstyle job
    steps:
      - name: Checkout
        uses: actions/checkout@v2
      - name: Run check style
        uses: nikitasavinov/checkstyle-action@0.4.0
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}
          reporter: 'github-pr-review'
          fail_on_error: true
          level: 'error'
          checkstyle_config: 'checkstyle.xml'

