Skip to content

Commit 5992098

Browse files
authored
ci(lint): setup YAML Lint step (#68)
Setup YAMLLint --------- Signed-off-by: Matthieu MOREL <[email protected]>
1 parent 7a452d2 commit 5992098

File tree

4 files changed

+32
-19
lines changed

4 files changed

+32
-19
lines changed

.github/dependabot.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ updates:
44
directory: "/"
55
schedule:
66
interval: "monthly"
7+
78
- package-ecosystem: "gomod" # Dependencies listed in go.mod
8-
directory: "/" # Location of package manifests
9+
directory: "/" # Location of package manifests
910
schedule:
1011
interval: "weekly"

.github/workflows/test.yml

+13-15
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ on:
1414
jobs:
1515
test:
1616
permissions:
17-
contents: read # for actions/checkout to fetch code
17+
contents: read # for actions/checkout to fetch code
1818
timeout-minutes: 10
1919

2020
strategy:
@@ -29,17 +29,15 @@ jobs:
2929
os: [ubuntu-20.04, ubuntu-22.04, windows-2022]
3030
runs-on: ${{ matrix.os }}
3131
steps:
32-
- name: Install Go
33-
uses: actions/setup-go@v3
34-
with:
35-
go-version: ${{ matrix.go-version }}
36-
- name: Checkout code
37-
uses: actions/checkout@v3
38-
- name: go mod tidy
39-
run: |
40-
go mod tidy
41-
git diff --exit-code
42-
- name: Test
43-
run: |
44-
go test -exec "sudo -n" -v ./...
45-
32+
- name: Install Go
33+
uses: actions/setup-go@v3
34+
with:
35+
go-version: ${{ matrix.go-version }}
36+
- name: Checkout code
37+
uses: actions/checkout@v3
38+
- name: go mod tidy
39+
run: |
40+
go mod tidy
41+
git diff --exit-code
42+
- name: Test
43+
run: go test -exec "sudo -n" -v ./...

.github/workflows/validate.yml

+8-3
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ on:
1414
jobs:
1515
linters:
1616
permissions:
17-
contents: read # for actions/checkout to fetch code
18-
pull-requests: read # for golangci/golangci-lint-action to fetch pull requests
17+
contents: read # for actions/checkout to fetch code
18+
pull-requests: read # for golangci/golangci-lint-action to fetch pull requests
1919
timeout-minutes: 10
2020

2121
strategy:
@@ -32,7 +32,12 @@ jobs:
3232
go-version: ${{ matrix.go-version }}
3333
- name: Checkout code
3434
uses: actions/checkout@v3
35-
- name: Lint
35+
- name: YAML Lint
36+
if: runner.os == 'Linux'
37+
uses: ibiqlik/action-yamllint@v3
38+
with:
39+
format: auto
40+
- name: Golangci-lint
3641
uses: golangci/golangci-lint-action@v3
3742
with:
3843
version: latest

.yamllint.yml

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
extends: default
3+
4+
rules:
5+
document-start: disable
6+
line-length: disable
7+
truthy:
8+
ignore: |
9+
.github/workflows/*.yml

0 commit comments

Comments
 (0)