Skip to content

Commit

Permalink
Add pr-builder
Browse files Browse the repository at this point in the history
  • Loading branch information
omindu authored Jun 12, 2021
1 parent 4f585a2 commit cfa7a24
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/pr-builder.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# This workflow will build the project on pull requests with tests
# Uses:
# OS: ubuntu-latest
# JDK: Adopt JDK 8

name: PR Builder

on:
pull_request:
branches: [main, master]
workflow_dispatch:

env:
MAVEN_OPTS: -Xmx4g -Xms1g

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Adopt JDK 8
uses: actions/setup-java@v2
with:
java-version: "8"
distribution: "adopt"
- name: Cache local Maven repository
id: cache-maven-m2
uses: actions/cache@v2
env:
cache-name: cache-m2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-${{ env.cache-name }}-
${{ runner.os }}-maven-
${{ runner.os }}-
- name: Build with Maven
run: mvn clean install -U -B

0 comments on commit cfa7a24

Please sign in to comment.