mirror of https://github.com/vishvananda/netns
ci(lint): setup YAML Lint step (#68)
Setup YAMLLint --------- Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
This commit is contained in:
parent
7a452d2d15
commit
59920981a6
|
@ -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"
|
||||
|
|
|
@ -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:
|
||||
|
@ -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 ./...
|
||||
|
|
|
@ -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:
|
||||
|
@ -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
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
---
|
||||
extends: default
|
||||
|
||||
rules:
|
||||
document-start: disable
|
||||
line-length: disable
|
||||
truthy:
|
||||
ignore: |
|
||||
.github/workflows/*.yml
|
Loading…
Reference in New Issue