maven-pr-builder.yml 2.0 KB
Newer Older
I
Ilkka Seppälä 已提交
1 2
#
# The MIT License
3
# Copyright © 2014-2021 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

on:
  pull_request:
    branches: [ master ]
32
    types: [ opened, reopened, synchronize ]
I
Ilkka Seppälä 已提交
33 34 35 36

jobs:
  build:

S
Subhrodip Mohanta 已提交
37
    runs-on: ubuntu-20.04
I
Ilkka Seppälä 已提交
38 39

    steps:
S
Subhrodip Mohanta 已提交
40
    - name: Checkout Code
41
      uses: actions/checkout@master
S
Subhrodip Mohanta 已提交
42
    
I
Ilkka Seppälä 已提交
43
    - name: Set up JDK 11
44
      uses: actions/setup-java@master
I
Ilkka Seppälä 已提交
45 46
      with:
        java-version: 11
47
        distribution: 'adopt'
S
Subhrodip Mohanta 已提交
48 49
    
    - name: Cache Maven Dependecies
50
      uses: actions/cache@master
S
Subhrodip Mohanta 已提交
51 52 53 54 55
      with:
        path: ~/.m2/repository
        key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
        restore-keys: |
          ${{ runner.os }}-maven-
S
Subhrodip Mohanta 已提交
56
    
I
Ilkka Seppälä 已提交
57
    # Some tests need screen access
I
Ilkka Seppälä 已提交
58
    - name: Install xvfb
S
Subhrodip Mohanta 已提交
59
      run: sudo apt-get install -y xvfb
S
Subhrodip Mohanta 已提交
60
    
I
Ilkka Seppälä 已提交
61
    - name: Build with Maven
62
      run: xvfb-run ./mvnw clean verify