Skip to content

Commit 8821d03

Browse files
committed
Add Github workflow
1 parent cfd9121 commit 8821d03

File tree

2 files changed

+37
-0
lines changed

2 files changed

+37
-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

pom.xml

+1
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@
120120
<dependency>
121121
<groupId>junit</groupId>
122122
<artifactId>junit</artifactId>
123+
<version>4.13</version>
123124
<scope>test</scope>
124125
</dependency>
125126
<dependency>

0 commit comments

Comments
 (0)