-
Notifications
You must be signed in to change notification settings - Fork 7
46 lines (43 loc) · 1.14 KB
/
verify.yml
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
46
name: Verify Codebase
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
name: Verify Codebase
runs-on: ubuntu-latest
env:
MVN: ./mvnw --show-version --batch-mode
steps:
- name: Checkout
id: checkout
uses: actions/checkout@v4
- name: Set up JDK
id: setup-jdk
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: maven
- name: Install
id: install
run: $MVN install -Pexamples
format-check:
name: Check Code Formatting
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: 17
distribution: 'temurin'
cache: 'maven'
- name: Format Source
run: "mvn -B clean install -DskipTests formatter:format -Pexamples"
- name: Check for changes
run: |
[ -z "$(git status --porcelain=v1 2>/dev/null)" ] || (echo -e "::error ::Changes have been found\n$(git diff)" && exit 1)