maven-pr-builder.yml 2.0 KB
Newer Older
I
Ilkka Seppälä 已提交
1 2
#
# The MIT License
3
# Copyright © 2014-2019 Ilkka Seppälä
I
Ilkka Seppälä 已提交
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
#

I
Ilkka Seppälä 已提交
24 25 26
# 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

S
Subhrodip Mohanta 已提交
27
name: Java PR Builder
I
Ilkka Seppälä 已提交
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43

on:
  pull_request:
    branches: [ master ]

jobs:
  build:

    runs-on: ubuntu-18.04

    steps:
    - uses: actions/checkout@v2
    - name: Set up JDK 11
      uses: actions/setup-java@v1
      with:
        java-version: 11
44
    - uses: actions/cache@v2
S
Subhrodip Mohanta 已提交
45 46 47 48 49
      with:
        path: ~/.m2/repository
        key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
        restore-keys: |
          ${{ runner.os }}-maven-
I
Ilkka Seppälä 已提交
50
    # Some tests need screen access
I
Ilkka Seppälä 已提交
51
    - name: Install xvfb
S
Subhrodip Mohanta 已提交
52
      run: sudo apt-get install -y xvfb
53 54
    # SonarQube scan does not work for forked repositories
    # See https://jira.sonarsource.com/browse/MMF-1371
I
Ilkka Seppälä 已提交
55
    - name: Build with Maven
56
      run: xvfb-run mvn clean verify