forked from red-hat-storage/ocs-operator
-
Notifications
You must be signed in to change notification settings - Fork 0
123 lines (103 loc) · 2.77 KB
/
ocs-operator-ci.yaml
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
---
name: ocs-operator sanity checks
on:
push:
branches: ["*"]
pull_request:
branches: ["*"]
jobs:
shellcheck:
name: shellcheck
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Run shellcheck
run: make shellcheck-test
golangci-lint:
name: golangci-lint
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
go: ["1.21"]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go }}
- uses: golangci/golangci-lint-action@v3
with:
version: v1.54.2
args: "--out-format=colored-line-number --timeout=6m ./..."
go-test:
name: go test
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
go: ["1.21"]
steps:
- uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go }}
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Run go test
run: make unit-test
verify-changes:
name: verify generated changes
runs-on: ubuntu-latest
continue-on-error: true
strategy:
fail-fast: false
matrix:
go: ["1.21"]
steps:
- uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go }}
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Verify go dependencies
run: make verify-deps
- name: Verify generated code and configs
run: make verify-generated
- name: Verify ocs csv changes
run: make verify-latest-csv
- name: Verify ocs bundle changes
run: make verify-operator-bundle
- name: Verify deployment YAML
run: make verify-latest-deploy-yaml
code-spell:
name: verify code spellings
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: codespell-project/actions-codespell@master
with:
check_filenames: true
check_hidden: true
skip: vendor,go.sum,api/go.sum,go.work.sum
ignore_words_list: xdescribe,contails,shouldnot
commitlint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: wagoid/commitlint-github-action@v5
with:
configFile: './.github/workflows/conf/commitlintrc.json'
helpURL: |
Some helpful links
Naming Conventions -> https://commitlint.js.org/#/concepts-commit-conventions
Rules -> https://commitlint.js.org/#/reference-rules
How to Write a Good Git Commit Message -> https://chris.beams.io/posts/git-commit