Skip to content

Commit 44fe812

Browse files
committed
Add Github workflow
1 parent cfd9121 commit 44fe812

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

.github/workflows/maven.yml

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Java CI with Maven
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
branches:
9+
- master
10+
11+
jobs:
12+
test:
13+
runs-on: ubuntu-latest
14+
strategy:
15+
matrix:
16+
java: [ 8, 11, 12, 13 ]
17+
name: Java ${{ matrix.java }} compile
18+
steps:
19+
- uses: actions/checkout@master
20+
21+
- name: Cache maven dependencies
22+
uses: actions/cache@v1
23+
env:
24+
cache-name: cache-maven-dependencies
25+
with:
26+
path: ~/.m2
27+
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }}
28+
restore-keys: |
29+
${{ runner.os }}-build-${{ env.cache-name }}-
30+
31+
- name: Setup java
32+
uses: actions/setup-java@v1
33+
with:
34+
java-version: ${{ matrix.java }}
35+
36+
- run: mvn test

0 commit comments

Comments
 (0)