Skip to content

Commit

Permalink
ci(lint): setup YAML Lint step (#68)
Browse files Browse the repository at this point in the history
Setup YAMLLint

---------

Signed-off-by: Matthieu MOREL <[email protected]>
  • Loading branch information
mmorel-35 authored Feb 5, 2023
1 parent 7a452d2 commit 5992098
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 19 deletions.
3 changes: 2 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ updates:
directory: "/"
schedule:
interval: "monthly"

- package-ecosystem: "gomod" # Dependencies listed in go.mod
directory: "/" # Location of package manifests
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
28 changes: 13 additions & 15 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:
jobs:
test:
permissions:
contents: read # for actions/checkout to fetch code
contents: read # for actions/checkout to fetch code
timeout-minutes: 10

strategy:
Expand All @@ -29,17 +29,15 @@ jobs:
os: [ubuntu-20.04, ubuntu-22.04, windows-2022]
runs-on: ${{ matrix.os }}
steps:
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@v3
- name: go mod tidy
run: |
go mod tidy
git diff --exit-code
- name: Test
run: |
go test -exec "sudo -n" -v ./...
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@v3
- name: go mod tidy
run: |
go mod tidy
git diff --exit-code
- name: Test
run: go test -exec "sudo -n" -v ./...
11 changes: 8 additions & 3 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ on:
jobs:
linters:
permissions:
contents: read # for actions/checkout to fetch code
pull-requests: read # for golangci/golangci-lint-action to fetch pull requests
contents: read # for actions/checkout to fetch code
pull-requests: read # for golangci/golangci-lint-action to fetch pull requests
timeout-minutes: 10

strategy:
Expand All @@ -32,7 +32,12 @@ jobs:
go-version: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@v3
- name: Lint
- name: YAML Lint
if: runner.os == 'Linux'
uses: ibiqlik/action-yamllint@v3
with:
format: auto
- name: Golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: latest
Expand Down
9 changes: 9 additions & 0 deletions .yamllint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
extends: default

rules:
document-start: disable
line-length: disable
truthy:
ignore: |
.github/workflows/*.yml

0 comments on commit 5992098

Please sign in to comment.