Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci(lint): setup YAML Lint step #68

Merged
merged 12 commits into from
Feb 5, 2023
Merged
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 ./...
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these formatting changes are all nice improvements 👍

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