-
Notifications
You must be signed in to change notification settings - Fork 5
35 lines (33 loc) · 980 Bytes
/
style.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
name: Spotless Style Check
description: Check the formatting. Use "mvn spotless:apply" to format the code.
on:
push:
jobs:
check-formatting:
runs-on: ubuntu-latest
name: Check style
steps:
- name: Checkout source code
uses: actions/checkout@v4
# Sets up Java version
- name: Set up Java
uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-package: jdk
java-version: '17'
# Tycho requires at least Maven 3.9.0
- name: Set up Maven
uses: stCarolas/setup-maven@v5
with:
maven-version: 3.9.0
# Restores Maven dependecies
- name: Restore local Maven repository
uses: actions/cache@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Run spotless checks
run: mvn spotless:check