File tree Expand file tree Collapse file tree 3 files changed +59
-0
lines changed Expand file tree Collapse file tree 3 files changed +59
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Lint YAML files
2
+
3
+ on :
4
+ - push
5
+ - pull_request
6
+
7
+ jobs :
8
+ lint :
9
+ name : Lint
10
+ runs-on : ubuntu-latest
11
+
12
+ steps :
13
+ - name : Check out code
14
+ uses : actions/checkout@v2
15
+
16
+ - name : Setup Python
17
+ uses : actions/setup-python@v2
18
+ with :
19
+ python-version : 3.9
20
+
21
+ - name : Check YAML
22
+ run : make yamllint
23
+
Original file line number Diff line number Diff line change 1
1
HAS_LINT := $(shell command -v golangci-lint;)
2
+ HAS_YAMLLINT := $(shell command -v yamllint;)
2
3
HAS_SHELLCHECK := $(shell command -v shellcheck;)
3
4
HAS_SETUP_ENVTEST := $(shell command -v setup-envtest;)
4
5
@@ -36,6 +37,13 @@ ifndef HAS_LINT
36
37
endif
37
38
hack/verify-golangci-lint.sh
38
39
40
+ yamllint :
41
+ ifndef HAS_YAMLLINT
42
+ pip install yamllint
43
+ @echo "yamllint has been installed"
44
+ endif
45
+ hack/verify-yamllint.sh
46
+
39
47
vet :
40
48
go vet ./pkg/... ./cmd/...
41
49
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
3
+ # Copyright 2022 The Kubeflow Authors.
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ set -o errexit
18
+ set -o pipefail
19
+
20
+ cd " $( dirname " $0 " ) /.."
21
+
22
+ if [ -z " $( command -v yamllint) " ]; then
23
+ echo ' Can not find yamllint, install with: make yamllint'
24
+ exit 1
25
+ fi
26
+
27
+ echo ' Running yamllint'
28
+ yamllint -d " {extends: default, rules: {line-length: disable}}" examples/* manifests/*
You can’t perform that action at this time.
0 commit comments