-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (48 loc) · 1.45 KB
/
maven.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: Java CI with Maven
on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main, develop ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up AdoptOpenJDK 8
uses: actions/setup-java@v2
with:
java-version: '8'
distribution: 'adopt'
- name: Cache local Maven repository
uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Lint sources
run: mvn -B checkstyle:check
- name: Compile sources
run: mvn -B compile test-compile
- name: Run tests
run: mvn -B test
- name: Package artifact
run: mvn -B -fae -DskipTests=true package
- name: Report Checkstyle results
if: always()
uses: jwgmeligmeyling/[email protected]
with:
path: '**/checkstyle-result.xml'
- name: Report Surefire results
if: always()
uses: ScaCap/action-surefire-report@v1
- name: Aggregate JavaDoc
if: github.ref == 'refs/heads/main'
run: mvn -B javadoc:aggregate
- name: Deploy API docs
if: github.ref == 'refs/heads/main'
uses: JamesIves/[email protected]
with:
branch: gh-pages
folder: target/site/apidocs