-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (44 loc) · 1.29 KB
/
checkstyle-analysis.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
47
# This workflow performs a static analysis of your Java source code using
# CheckStyle.
#
# Scans are triggered:
# 1. On every push to default and protected branches
# 2. On every Pull Request targeting the default branch
# 3. On a weekly schedule
# 4. Manually, on demand, via the "workflow_dispatch" event
#
name: CheckStyle
on:
# Triggers the workflow on push or pull request events but only for default and protected branches
push:
branches: [ master ]
paths:
- ".github/workflows/checkstyle-analysis.yml"
- "./**/src/**"
- "./**/pom.xml"
- "pom.xml"
pull_request:
branches: [ master ]
paths:
- ".github/workflows/checkstyle-analysis.yml"
- "./**/src/**"
- "./**/pom.xml"
- "pom.xml"
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
CheckStyle:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 23
uses: actions/setup-java@v3
with:
java-version: "23"
distribution: "adopt"
cache: maven
- name: Grant execute permission for mvnw
run: chmod +x mvnw
- name: Check
run: ./mvnw checkstyle:check