Improve lint and unit tests

Signed-off-by: Itxaka <itxaka@kairos.io>
This commit is contained in:
Itxaka 2025-04-16 10:53:37 +02:00
parent 8c355e7add
commit 3dc1516c09
No known key found for this signature in database
GPG Key ID: FF934753A9D6AC56
2 changed files with 37 additions and 5 deletions

View File

@ -7,9 +7,6 @@ on:
jobs:
unit-tests:
strategy:
matrix:
go-version: ["1.23"]
runs-on: ubuntu-latest
steps:
- name: Checkout code
@ -19,8 +16,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
go-version-file: 'go.mod'
- name: Run tests
run: |
go run github.com/onsi/ginkgo/v2/ginkgo ./...

36
.golangci.yml Normal file
View File

@ -0,0 +1,36 @@
version: "2"
run:
tests: false
linters:
enable:
- dupl
- ginkgolinter
- gocheckcompilerdirectives
- goconst
- gocyclo
- godot
- goheader
- misspell
- revive
- zerologlint
exclusions:
generated: lax
presets:
- comments
- common-false-positives
- legacy
- std-error-handling
paths:
- third_party$
- builtin$
- examples$
formatters:
enable:
- gofmt
- goimports
exclusions:
generated: lax
paths:
- third_party$
- builtin$
- examples$