name: Java CI

on:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]
  workflow_dispatch:

jobs:
  build:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        java: [ '8', '11', '16' ]
    steps:
      - uses: actions/checkout@v2
      - name: Set up JDK ${{ matrix.Java }}
        uses: actions/setup-java@v2
        with:
          java-version: ${{ matrix.Java }}
          distribution: 'zulu'
          cache: maven
      - name: Maven Build
        run: mvn clean install javadoc:javadoc

  post-build:
    needs: [ build ]
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - name: Set up JDK
        uses: actions/setup-java@v2
        with:
          java-version: 16
          distribution: 'zulu'
          cache: maven
      - name: Coveralls Report
        run: mvn org.jacoco:jacoco-maven-plugin:prepare-agent test org.jacoco:jacoco-maven-plugin:report org.eluder.coveralls:coveralls-maven-plugin:report -DrepoToken=${{ secrets.COVERALLS_TOKEN }}

name: Java CI

on:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]
  workflow_dispatch:

jobs:
  build:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        java: [ '8', '11', '16' ]
    steps:
      - uses: actions/checkout@v2
      - name: Install graphviz
        run: sudo apt-get install graphviz
      - name: Set up JDK ${{ matrix.Java }}
        uses: actions/setup-java@v2
        with:
          java-version: ${{ matrix.Java }}
          distribution: 'zulu'
          cache: maven
      - name: Maven Build
        run: mvn clean install javadoc:javadoc

  post-build:
    needs: [ build ]
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - name: Install graphviz
        run: sudo apt-get install graphviz
      - name: Set up JDK
        uses: actions/setup-java@v2
        with:
          java-version: 16
          distribution: 'zulu'
          cache: maven
      - name: Coveralls Report
        run: mvn org.jacoco:jacoco-maven-plugin:prepare-agent test org.jacoco:jacoco-maven-plugin:report org.eluder.coveralls:coveralls-maven-plugin:report -DrepoToken=${{ secrets.COVERALLS_TOKEN }}

Install graphviz to run all tests
Install graphviz to run all tests
