forked from snyk-omar/monorepo-sakai
-
Notifications
You must be signed in to change notification settings - Fork 4
35 lines (32 loc) · 1.2 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
# This workflow will build a Java project with Maven
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
name: Java CI with Maven
on:
pull_request:
jobs:
maven-build:
runs-on: ubuntu-20.04
steps:
- name: Git Checkout
uses: actions/checkout@v2
- name: JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
architecture: x64
- 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: Build with Maven
env:
MAVEN_OPTS: -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=WARN -Dorg.slf4j.simpleLogger.showDateTime=true -Djava.awt.headless=true -Dmaven.wagon.http.retryHandler.count=2 -Dmaven.wagon.http.pool=true
run: mvn --batch-mode -PskipBrokenTests test
- name: Publish Test Report
if: ${{ always() }}
uses: scacap/action-surefire-report@v1
with:
skip_publishing: true