name: Java

on:
  - push
  - pull_request

jobs:
  java:
    name: ${{ matrix.java-version }}
    runs-on: ubuntu-latest
    strategy:
      matrix:
        java-version:
          - 8
          - 11
          - 17
    steps:
      - name: Check out GitHub repository
        uses: actions/checkout@v3
      - name: Set up Java
        uses: actions/setup-java@v3
        with:
          distribution: 'temurin'
          java-version: ${{ matrix.java-version }}
          cache: 'maven'
      - name: Run tests
        run: mvn test
      - name: Run Checkstyle
        run: mvn checkstyle:check
      - name: Generate Javadoc
        run: mvn compile javadoc:javadoc

name: Java

on:
  - push
  - pull_request
permissions:
  contents: read

jobs:
  java:
    name: ${{ matrix.java-version }}
    runs-on: ubuntu-latest
    strategy:
      matrix:
        java-version:
          - 8
          - 11
          - 17
    steps:
      - name: Check out GitHub repository
        uses: actions/checkout@v3
      - name: Set up Java
        uses: actions/setup-java@v3
        with:
          distribution: 'temurin'
          java-version: ${{ matrix.java-version }}
          cache: 'maven'
      - name: Run tests
        run: mvn test
      - name: Run Checkstyle
        run: mvn checkstyle:check
      - name: Generate Javadoc
        run: mvn compile javadoc:javadoc

Set permissions for GitHub Actions
Set permissions for GitHub Actions
