Skip to content

Commit

Permalink
Add Github workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
atombrella committed May 25, 2020
1 parent cfd9121 commit 8821d03
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down

0 comments on commit 8821d03

Please sign in to comment.