Skip to content

Commit c252cf8

Browse files
committed
ci: Add initial CI for PRs
ref: #5 #2
1 parent 2b7e64b commit c252cf8

File tree

3 files changed

+137
-0
lines changed

3 files changed

+137
-0
lines changed

.github/workflows/ci.yaml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
3+
name: Pull Requests
4+
5+
6+
on:
7+
pull_request: {}
8+
9+
10+
jobs:
11+
12+
lint:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v3
16+
17+
- name: Install yamllint
18+
run: pip install yamllint
19+
20+
- name: Lint YAML files
21+
run: yamllint ${PWD}/
22+
23+
24+
pull-request:
25+
name: pull-request
26+
uses: nofusscomputing/action_pull_requests/.github/workflows/pull-requests.yaml@development

.vscode/settings.json

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"linter.linters": {
3+
"yamllint": {
4+
"capabilities": [
5+
"ignore-line"
6+
],
7+
"command": [
8+
"yamllint",
9+
"--format",
10+
"parsable",
11+
[
12+
"$config",
13+
"--config-file",
14+
"$config"
15+
],
16+
"-"
17+
],
18+
"configFiles": [
19+
".yamllint.yml",
20+
".yamllint.yaml",
21+
".yamllint"
22+
],
23+
"enabled": true,
24+
"languages": [
25+
"yaml"
26+
],
27+
"name": "yamllint",
28+
"url": "https://github.com/adrienverge/yamllint"
29+
}
30+
},
31+
"editor.detectIndentation": false,
32+
"editor.indentSize": "tabSize",
33+
"editor.tabSize": 2,
34+
"files.eol": "\n"
35+
}

.yamllint

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
---
2+
3+
# extends: default
4+
5+
6+
ignore:
7+
- '.github/'
8+
- '**/crd/**'
9+
- '*PrometheusRule*'
10+
- '**/source/**'
11+
12+
rules:
13+
braces:
14+
level: error
15+
max-spaces-inside: 1
16+
min-spaces-inside: 1
17+
min-spaces-inside-empty: 0
18+
max-spaces-inside-empty: 0
19+
20+
brackets:
21+
level: error
22+
max-spaces-inside: 1
23+
min-spaces-inside: 1
24+
min-spaces-inside-empty: 0
25+
max-spaces-inside-empty: 0
26+
27+
colons:
28+
level: warning
29+
max-spaces-after: 1
30+
31+
commas:
32+
level: warning
33+
34+
comments:
35+
level: error
36+
require-starting-space: true
37+
ignore-shebangs: true
38+
min-spaces-from-content: 4
39+
40+
comments-indentation:
41+
level: error
42+
43+
document-end:
44+
level: error
45+
present: false
46+
47+
document-start:
48+
level: error
49+
present: true
50+
51+
empty-lines:
52+
level: error
53+
max: 3
54+
max-start: 0
55+
max-end: 0
56+
57+
hyphens:
58+
level: error
59+
max-spaces-after: 1
60+
61+
indentation:
62+
level: error
63+
spaces: 2
64+
indent-sequences: true
65+
check-multi-line-strings: true
66+
67+
line-length:
68+
level: warning
69+
max: 100
70+
allow-non-breakable-inline-mappings: true
71+
72+
new-lines:
73+
level: error
74+
type: unix
75+
76+
truthy: disable

0 commit comments

Comments
 (0)