Skip to content

Commit 455a80e

Browse files
committed
ci: add typos check and conventional commits check
1 parent 60cfc86 commit 455a80e

File tree

2 files changed

+21
-9
lines changed

2 files changed

+21
-9
lines changed

.github/workflows/ci.yaml

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,20 @@ jobs:
2626
with:
2727
files: ./coverage.out
2828

29-
golint:
29+
static-check:
3030
runs-on: [ubuntu-20.04]
3131
if: ${{ github.event_name == 'pull_request' }}
3232
steps:
3333
- uses: actions/checkout@v2
34-
- uses: golangci/golangci-lint-action@v2
34+
35+
- name: Check conventional commits
36+
uses: webiny/[email protected]
37+
38+
- name: Check spelling
39+
uses: crate-ci/[email protected]
40+
41+
- name: Check golang lint
42+
uses: golangci/golangci-lint-action@v2
3543
with:
3644
version: v1.48.0
3745
only-new-issues: true
@@ -137,21 +145,21 @@ jobs:
137145

138146
slack-notification:
139147
if: ${{ always() }}
140-
needs: [ pr-check,golint,run-e2e,run-k8s-e2e,run-tower-e2e,generate-check ]
148+
needs: [ pr-check,static-check,run-e2e,run-k8s-e2e,run-tower-e2e,generate-check ]
141149
runs-on: [ ubuntu-20.04 ]
142150
env:
143151
SLACK_COLOR: 2EA44F
144152
RESULT_PR_CHECK: ":white_check_mark:"
145-
RESULT_GOLINT: ":white_check_mark:"
153+
RESULT_STATIC_CHECK: ":white_check_mark:"
146154
RESULT_RUN_E2E: ":white_check_mark:"
147155
RESULT_RUN_K8S_E2E: ":white_check_mark:"
148156
RESULT_RUN_TOWER_E2E: ":white_check_mark:"
149157
RESULT_GENERATE_CHECK: ":white_check_mark:"
150158
steps:
151159
- if: ${{ needs.pr-check.result == 'failure'}}
152160
run: echo "SLACK_COLOR=DF0000" >> $GITHUB_ENV && echo "RESULT_PR_CHECK=:x:" >> $GITHUB_ENV
153-
- if: ${{ needs.golint.result == 'failure'}}
154-
run: echo "SLACK_COLOR=DF0000" >> $GITHUB_ENV && echo "RESULT_GOLINT=:x:" >> $GITHUB_ENV
161+
- if: ${{ needs.static-check.result == 'failure'}}
162+
run: echo "SLACK_COLOR=DF0000" >> $GITHUB_ENV && echo "RESULT_STATIC_CHECK=:x:" >> $GITHUB_ENV
155163
- if: ${{ needs.run-e2e.result == 'failure'}}
156164
run: echo "SLACK_COLOR=DF0000" >> $GITHUB_ENV && echo "RESULT_RUN_E2E=:x:" >> $GITHUB_ENV
157165
- if: ${{ needs.run-k8s-e2e.result == 'failure'}}
@@ -163,8 +171,8 @@ jobs:
163171

164172
- if: ${{ needs.pr-check.result == 'cancelled'}}
165173
run: echo "RESULT_PR_CHECK=:ballot_box_with_check:" >> $GITHUB_ENV
166-
- if: ${{ needs.golint.result == 'cancelled'}}
167-
run: echo "RESULT_GOLINT=:ballot_box_with_check:" >> $GITHUB_ENV
174+
- if: ${{ needs.static-check.result == 'cancelled'}}
175+
run: echo "RESULT_STATIC_CHECK=:ballot_box_with_check:" >> $GITHUB_ENV
168176
- if: ${{ needs.run-e2e.result == 'cancelled'}}
169177
run: echo "RESULT_RUN_E2E=:ballot_box_with_check:" >> $GITHUB_ENV
170178
- if: ${{ needs.run-k8s-e2e.result == 'cancelled'}}
@@ -220,7 +228,7 @@ jobs:
220228
},
221229
{
222230
"type": "mrkdwn",
223-
"text": "${{ env.RESULT_GOLINT }} => *golint*"
231+
"text": "${{ env.RESULT_STATIC_CHECK }} => *static-check*"
224232
},
225233
{
226234
"type": "mrkdwn",

.typos.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[files]
2+
extend-exclude = [
3+
"deploy/crds",
4+
"deploy/everoute.yaml"]

0 commit comments

Comments
 (0)