-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ef6eba1
commit 78f1481
Showing
1 changed file
with
42 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# This workflow will build the project on pull requests with tests | ||
# Uses: | ||
# OS: ubuntu-latest | ||
# JDK: Adopt JDK 11 | ||
|
||
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@v4 | ||
- name: Set up Adopt JDK 11 | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: "11" | ||
distribution: "temurin" | ||
- name: Cache local Maven repository | ||
id: cache-maven-m2 | ||
uses: actions/cache@v4 | ||
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 | ||
- name: Generate coverage report | ||
run: mvn test jacoco:report |