Skip to content

Commit 5cae083

Browse files
committed
Create maven.yml
1 parent 2e37486 commit 5cae083

File tree

2 files changed

+20
-13
lines changed

2 files changed

+20
-13
lines changed

.github/workflows/maven.yml

+19-12
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,36 @@
11
# This workflow will build a Java project with Maven
22
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
33

4-
name: Build
5-
6-
on:
7-
push:
8-
branches: [ $default-branch ]
9-
pull_request:
10-
branches: [ $default-branch ]
4+
name: Java CI with Maven
115

6+
on: [push, pull_request]
7+
128
jobs:
13-
build:
9+
compile:
1410
runs-on: ubuntu-latest
11+
12+
strategy:
13+
matrix:
14+
java: [ 8, 11, 12, 13 ]
15+
16+
name: Java ${{ matrix.java }} compile
1517
steps:
16-
- uses: actions/checkout@v2
17-
- name: Set up JDK 8
18+
- name: Checkout Source Code
19+
uses: actions/checkout@v2
20+
21+
- name: Setup Java
1822
uses: actions/setup-java@v2
1923
with:
20-
java-version: '8'
2124
distribution: 'adopt'
25+
java-package: jdk
26+
java-version: ${{ matrix.java }}
27+
2228
- name: Cache Maven packages
2329
uses: actions/cache@v2
2430
with:
2531
path: ~/.m2
2632
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
2733
restore-keys: ${{ runner.os }}-m2
28-
- name: Build with Maven
34+
35+
- name: Build with maven
2936
run: mvn -B package --file pom.xml

pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@
166166
<plugin>
167167
<groupId>org.jacoco</groupId>
168168
<artifactId>jacoco-maven-plugin</artifactId>
169-
<version>0.8.2</version>
169+
<version>0.8.6</version>
170170
<executions>
171171
<execution>
172172
<id>prepare-agent</id>

0 commit comments

Comments
 (0)