| name: Build and Run Tests by Maven |
| on: |
| pull_request: |
| types: [opened, reopened, synchronize] |
| push: |
| branches: [master, develop, bazel] |
| jobs: |
| java_build: |
| name: "maven-compile (${{ matrix.os }}, JDK-${{ matrix.jdk }})" |
| runs-on: ${{ matrix.os }} |
| strategy: |
| fail-fast: false |
| matrix: |
| # see https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources |
| os: [ubuntu-latest, windows-latest, macos-latest] |
| jdk: [8] |
| steps: |
| - name: Checkout |
| uses: actions/checkout@v2 |
| - name: Set up JDK ${{ matrix.jdk }} |
| uses: actions/setup-java@v2 |
| with: |
| java-version: ${{ matrix.jdk }} |
| distribution: "adopt" |
| cache: "maven" |
| - name: Build with Maven |
| run: mvn -B package --file pom.xml |