File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -10,6 +10,36 @@ permissions:
1010 contents : read
1111
1212jobs :
13+ lint :
14+ runs-on : ubuntu-latest
15+ steps :
16+ - name : Checkout
17+ uses : actions/checkout@v4
18+
19+ - name : Set up Go
20+ uses : actions/setup-go@v5
21+ with :
22+ go-version-file : go.mod
23+ cache : true
24+
25+ - name : Verify vendor is up to date
26+ run : |
27+ go mod tidy
28+ go mod vendor
29+ git diff --exit-code -- go.mod go.sum vendor/
30+
31+ - name : Run golangci-lint
32+ uses : golangci/golangci-lint-action@v9
33+ with :
34+ version : v2.8
35+ args : --timeout=5m ./...
36+
37+ - name : Run govulncheck
38+ uses : golang/govulncheck-action@v1
39+ with :
40+ go-version-file : go.mod
41+ go-package : ./...
42+
1343 test :
1444 runs-on : ubuntu-latest
1545 steps :
Original file line number Diff line number Diff line change 1+ version : " 2"
2+
3+ run :
4+ timeout : 5m
5+ modules-download-mode : vendor
6+
7+ linters :
8+ enable :
9+ - bodyclose
10+ - errorlint
11+ - gosec
12+ - misspell
13+ - nilerr
14+ - revive
15+
16+ formatters :
17+ enable :
18+ - gofumpt
19+ settings :
20+ gofumpt :
21+ extra-rules : true
22+
23+ issues :
24+ max-issues-per-linter : 0
25+ max-same-issues : 0
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ GOFLAGS ?= -mod=vendor
22VENDOR_STAMP := vendor/.modules.stamp
33MODULE_FILES := go.mod $(wildcard go.sum)
44
5- .PHONY : vendor test build verify-vendor codegen
5+ .PHONY : vendor test build lint vuln verify-vendor codegen
66
77$(VENDOR_STAMP ) : $(MODULE_FILES )
88 go mod tidy
@@ -18,6 +18,14 @@ test: $(VENDOR_STAMP)
1818build : $(VENDOR_STAMP )
1919 GOFLAGS=$(GOFLAGS ) go build ./...
2020
21+ lint : $(VENDOR_STAMP )
22+ @command -v golangci-lint > /dev/null || (echo " golangci-lint not found; use nix develop" && exit 1)
23+ GOFLAGS=$(GOFLAGS ) golangci-lint run ./...
24+
25+ vuln : $(VENDOR_STAMP )
26+ @command -v govulncheck > /dev/null || (echo " govulncheck not found; use nix develop" && exit 1)
27+ GOFLAGS=$(GOFLAGS ) govulncheck ./...
28+
2129verify-vendor :
2230 go mod tidy
2331 go mod vendor
Original file line number Diff line number Diff line change 2525 goreleaser
2626 actionlint
2727 zizmor
28+ golangci-lint
29+ govulncheck
2830 ] ;
2931 } ;
3032 }
Original file line number Diff line number Diff line change 11module github.com/coder/coder-k8s
22
3- go 1.25.6
3+ go 1.25.7
44
55require (
66 k8s.io/apimachinery v0.35.0
Original file line number Diff line number Diff line change 55package deps
66
77import (
8- _ "k8s.io/apimachinery/pkg/runtime"
9- _ "k8s.io/client-go/kubernetes"
10- _ "k8s.io/code-generator"
11- _ "sigs.k8s.io/controller-runtime/pkg/client"
8+ _ "k8s.io/apimachinery/pkg/runtime" // Keep apimachinery runtime dependency vendored.
9+ _ "k8s.io/client-go/kubernetes" // Keep client-go kubernetes client vendored.
10+ _ "k8s.io/code-generator" // Keep code-generator scripts vendored.
11+ _ "sigs.k8s.io/controller-runtime/pkg/client" // Keep controller-runtime client vendored.
1212)
Original file line number Diff line number Diff line change 1+ // Package main provides the entrypoint for the coder-k8s binary.
12package main
23
34import (
You can’t perform that action at this time.
0 commit comments