10000 chore(ci): check commit format according to .conform.yaml spec · Sgitario/java-operator-sdk@bb572fc · GitHub
[go: up one dir, main page]

Skip to content

Commit bb572fc

Browse files
committed
chore(ci): check commit format according to .conform.yaml spec
See https://github.com/talos-systems/conform for more details. Also re-order checks so that code formatting and commit check happen earlier.
1 parent b4b1a0e commit bb572fc

File tree

2 files changed

+36
-5
lines changed

2 files changed

+36
-5
lines changed

.conform.yaml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
policies:
2+
- type: commit
3+
spec:
4+
header:
5+
length: 89
6+
imperative: true
7+
case: lower
8+
invalidLastCharacters: .
9+
spellcheck:
10+
locale: US
11+
maximumOfOneCommit: true
12+
conventional:
13+
types:
14+
- "chore"
15+
- "refactor"
16+
- "fix"
17+
- "feat"
18+
- "build"
19+
- "style"
20+
- "test"
21+
- "docs"
22+
- "perf"
23+
- "ci"
24+
- "revert"
25+
scopes:
26+
- "format"
27+
- "ci"
28+
- "build"
29+
descriptionLength: 72

.github/workflows/pr.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,13 @@ jobs:
1111
kubernetes: ['v1.17.13','v1.18.12','v1.19.4']
1212
steps:
1313
- uses: actions/checkout@v2
14+
- name: Format code
15+
uses: axel-op/googlejavaformat-action@v3
16+
with:
17+
commitMessage: "chore(format): re-format code"
18+
args: "--replace"
19+
- name: Check commit format
20+
uses: talos-systems/conform@v0.1.0-alpha.20
1421
- uses: actions/cache@v2
1522
with:
1623
path: ~/.m2/repository
@@ -21,11 +28,6 @@ jobs:
2128
uses: actions/setup-java@v1
2229
with:
2330
java-version: ${{ matrix.java }}
24-
- name: Format code
25-
uses: axel-op/googlejavaformat-action@v3
26-
with:
27-
commitMessage: "chore(format): re-format code"
28-
args: "--replace"
2931
- name: Run unit tests
3032
run: mvn -B test -P no-integration-tests --file pom.xml
3133
- name: Set up Minikube

0 commit comments

Comments
 (0)
0