# This workflow will build a Java project with Maven
# This runs only on PR and on master

name: Java CI with Maven on Windows and Mac

on:
  push:
    paths-ignore:
      - 'README.md'
    # Sequence of patterns matched against refs/heads
    branches:
      # Push events on the main branch
      - master
  pull_request:
    paths-ignore:
      - 'README.md'

jobs:
  build:
    strategy:
      matrix:
        os: ['macos-latest', 'windows-latest']
      fail-fast: false
    runs-on: ${{ matrix.os }}

    steps:
    - uses: actions/checkout@v2
    - name: Set up JDK 1.8
      uses: actions/setup-java@v1
      with:
        java-version: 1.8
    - name: Cache Maven packages
      uses: actions/cache@v2
      with:
        path: ~/.m2
        key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml', '**/*.yml', '**/*.target') }}
        restore-keys: ${{ runner.os }}-m2-
    - name: Build with Maven
      run: mvn -f javamm.releng/pom.xml '-Dtycho.disableP2Mirrors=true' verify

Build also on Windows and macOS
107: Build also on Windows and macOS

Task-Url: https://github.com/LorenzoBettini/javamm/issues/107