2020-12-20 13:48:00 -05:00
|
|
|
# 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:
|
|
|
|
push:
|
|
|
|
branches: [ trunk ]
|
|
|
|
pull_request:
|
|
|
|
branches: [ trunk ]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
2021-07-04 18:22:53 -04:00
|
|
|
- name: Set up JDK
|
2021-07-04 10:02:27 -04:00
|
|
|
uses: actions/setup-java@v2
|
2020-12-20 13:48:00 -05:00
|
|
|
with:
|
2021-07-04 10:10:16 -04:00
|
|
|
distribution: 'adopt'
|
2021-07-04 18:22:53 -04:00
|
|
|
java-version: '11'
|
2021-07-04 10:10:16 -04:00
|
|
|
check-latest: true
|
2020-12-20 13:48:00 -05:00
|
|
|
|
|
|
|
- name: Cache
|
|
|
|
uses: actions/cache@v2.1.3
|
|
|
|
with:
|
2021-02-06 10:23:11 -05:00
|
|
|
path: ~/.m2/repository
|
|
|
|
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
|
|
|
|
restore-keys: |
|
|
|
|
${{ runner.os }}-maven-
|
2020-12-20 13:48:00 -05:00
|
|
|
|
|
|
|
- name: Build with Maven
|
|
|
|
run: (cd sonar && mvn -B validate package --file pom.xml)
|