-
Notifications
You must be signed in to change notification settings - Fork 11
45 lines (43 loc) · 1.66 KB
/
maven-full.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: Full Maven Compile
on:
pull_request:
paths:
- '.github/workflows/maven-full.yaml'
- 'java/**'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'corretto'
- name: Cache dependencies
uses: actions/cache@v3
with:
path: ../.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Resolve dependencies
run: mvn de.qaware.maven:go-offline-maven-plugin:resolve-dependencies -Dmaven.repo.local=../../.m2/repository
working-directory: ./java
- name: Build with Maven
run: mvn --batch-mode verify -Pquick -T 1C -Dmaven.repo.local=../../.m2/repository
working-directory: ./java
- name: Validate properties templates are up to date
working-directory: ./java
run: |
PROJECT_ROOT=$(cd .. && pwd)
mvn install -Pquick -q -e -pl configuration -am -Dmaven.repo.local=../../.m2/repository
mvn exec:java -q -e -Dmaven.repo.local=../../.m2/repository -pl configuration \
-Dexec.mainClass=sleeper.configuration.properties.format.GeneratePropertiesTemplates \
-Dexec.args="$PROJECT_ROOT"
CHANGED_FILES=$(git status --porcelain)
if [ ${#CHANGED_FILES} -gt 0 ]; then
echo "Found files changed by properties template generation."
echo "Please run scripts/dev/generatePropertiesTemplates.sh and commit."
echo "$CHANGED_FILES"
exit 1
fi