-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (30 loc) · 792 Bytes
/
Copy pathjava-lint.yml
File metadata and controls
36 lines (30 loc) · 792 Bytes
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
name: Java Lint
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
lint:
name: Lint Java Code
runs-on: ubuntu-latest
steps:
# 1. Checkout the repository
- name: Checkout repository
uses: actions/checkout@v3
# 2. Set up Java (e.g., JDK 17)
- name: Set up JDK
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 17
# 3. Cache Maven dependencies (optional)
- name: Cache Maven packages
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: maven-${{ hashFiles('**/pom.xml') }}
restore-keys: maven-
# 4. Run Maven Checkstyle
- name: Run Maven Checkstyle
run: mvn checkstyle:check