Skip to content

Commit

Permalink
Setup GitHub Action for CI
Browse files Browse the repository at this point in the history
  • Loading branch information
jamezp committed Mar 24, 2020
1 parent 76b49c9 commit 7fba1d0
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# This workflow will build a Java project with Maven
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven

name: Java CI with Maven

on:
push:
branches: [ '**' ]
pull_request:
branches: [ '**' ]

jobs:
build:

runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest ]

steps:
- uses: actions/checkout@v2
- uses: actions/cache@v1
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
- name: Build with Maven Linux
if: runner.os == 'Linux'
run: mvn verify -Djava8.home=$JAVA_HOME_8_X64
- name: Build with Maven Windows
if: runner.os == 'Windows'
run: mvn verify '-Djava8.home="%JAVA_HOME_8_X64%"'

0 comments on commit 7fba1d0

Please sign in to comment.