File tree Expand file tree Collapse file tree 2 files changed +51
-2
lines changed Expand file tree Collapse file tree 2 files changed +51
-2
lines changed Original file line number Diff line number Diff line change 31
31
run : echo "maven_bundle_url=$(./scripts/maven-bundle-url.sh | tail -n 1)" >> $GITHUB_OUTPUT
32
32
shell : bash
33
33
34
+ pre_commit :
35
+ runs-on : ubuntu-latest
36
+ steps :
37
+ - name : Checkout code
38
+ uses : actions/checkout@v2
39
+
40
+ - name : Setup Java 21
41
+ id : java21
42
+ uses : actions/setup-java@v4
43
+ with :
44
+ distribution : temurin
45
+ java-version : 21
46
+
47
+ - name : Set up Python
48
+ uses : actions/setup-python@v5
49
+ with :
50
+ python-version : ' 3.11'
51
+
52
+ - name : Install pre-commit
53
+ run : python -m pip install --upgrade pip pre-commit
54
+ shell : bash
55
+
56
+ - name : run pre-commit
57
+ run : pre-commit run --all-files
58
+ shell : bash
59
+
34
60
build :
35
61
runs-on : ${{ matrix.os }}
36
- needs : maven_bundle_url
62
+ # pre_commit not needed, but is in 'needs' to avoid wasting CI cycles in case it doesn't pass
63
+ needs : [maven_bundle_url, pre_commit]
37
64
strategy :
38
65
matrix :
39
66
os : [ubuntu-latest, windows-latest, macos-latest]
@@ -207,4 +234,4 @@ jobs:
207
234
208
235
- name : Run Maven tests
209
236
run : mvn --batch-mode -s settings.xml -Dgradle.java.home=$GRADLE_JAVA_HOME ${{ matrix.maven_args }}
210
- shell : bash
237
+ shell : bash
Original file line number Diff line number Diff line change
1
+ repos :
2
+ - repo : https://github.com/pre-commit/pre-commit-hooks
3
+ rev : v5.0.0
4
+ hooks :
5
+ - id : trailing-whitespace
6
+ - id : end-of-file-fixer
7
+ - id : check-yaml
8
+ - id : check-added-large-files
9
+ - id : check-xml
10
+ - id : check-executables-have-shebangs
11
+ - id : check-shebang-scripts-are-executable
12
+ - id : check-symlinks
13
+ - id : mixed-line-ending
14
+ args : ['--fix=no']
15
+ - repo : local
16
+ hooks :
17
+ - id : maven-validate-spotless
18
+ name : Maven validate & spotless:apply
19
+ entry : ./mvnw
20
+ args : ['validate', 'spotless:apply']
21
+ language : system
22
+ pass_filenames : false
You can’t perform that action at this time.
0 commit comments