diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml new file mode 100644 index 0000000..f4b9172 --- /dev/null +++ b/.github/workflows/maven.yml @@ -0,0 +1,36 @@ +name: Java CI with Maven + +on: + push: + branches: + - master + pull_request: + branches: + - master + +jobs: + test: + runs-on: ubuntu-latest + strategy: + matrix: + java: [ 8, 11, 12, 13 ] + name: Java ${{ matrix.java }} compile + steps: + - uses: actions/checkout@master + + - name: Cache maven dependencies + uses: actions/cache@v1 + env: + cache-name: cache-maven-dependencies + with: + path: ~/.m2 + key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }} + restore-keys: | + ${{ runner.os }}-build-${{ env.cache-name }}- + + - name: Setup java + uses: actions/setup-java@v1 + with: + java-version: ${{ matrix.java }} + + - run: mvn test