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: add dependabot for GitHub actions, update golangci-lint #39

Merged
merged 3 commits into from
Dec 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
version: 2
updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: daily
commit-message:
prefix: "ci:"
open-pull-requests-limit: 5
rebase-strategy: disabled
labels:
- area/testing
- area/github-actions
- kind/enhancement
12 changes: 7 additions & 5 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,18 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Install Go
uses: actions/setup-go@v3
uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568
with:
go-version: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b
- name: Run static checks
uses: golangci/golangci-lint-action@v3
uses: golangci/golangci-lint-action@0ad9a0988b3973e851ab0a07adf248ec2e100376
with:
version: v1.48.0
args: --config=.golangci.yml --verbose
version: v1.50.1
# use our .golangci.yml and configure output to be logged in the GHA, in addition to annotating the commit.
# see https://github.com/golangci/golangci-lint-action/issues/119#issuecomment-981090648 for output
args: --config=.golangci.yml --verbose --out-${NO_FUTURE}format colored-line-number --timeout 5m
skip-cache: true
- name: Build
run: go build
Expand Down
18 changes: 7 additions & 11 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# See https://golangci-lint.run/usage/configuration/ for available options.
# Also https://github.com/cilium/cilium/blob/master/.golangci.yaml as a
# reference.
run:
go: '1.19'
timeout: 1m
linters:
disable-all: true
enable:
Expand All @@ -11,10 +14,10 @@ linters:
- containedctx
- contextcheck
- cyclop
- deadcode
- decorder
- dogsled
- dupl
- dupword
- durationcheck
- errcheck
- errname
Expand All @@ -37,20 +40,22 @@ linters:
- govet
- grouper
- ineffassign
- interfacebloat
- ireturn
- makezero
- misspell
- nakedret
- nestif
- nilerr
- nilnil
- noctx
- nosprintfhostport
- prealloc
- predeclared
- reassign
- revive
- rowserrcheck
- staticcheck
- structcheck
- tenv
- thelper
- tparallel
Expand All @@ -59,7 +64,6 @@ linters:
- unparam
- unused
- usestdlibvars
- varcheck
- wastedassign

linters-settings:
Expand All @@ -70,13 +74,5 @@ linters-settings:
template: |-
SPDX-License-Identifier: Apache-2.0
Copyright Authors of Cilium
gosimple:
go: "1.19"
govet:
enable-all: true
staticcheck:
go: "1.19"
stylecheck:
go: "1.19"
unused:
go: "1.19"