diff --git a/.github/workflows/test-go.yaml b/.github/workflows/test-go.yaml new file mode 100644 index 00000000..77faaa2f --- /dev/null +++ b/.github/workflows/test-go.yaml @@ -0,0 +1,24 @@ +name: Lint and Test golang + + +on: + pull_request: + push: + branches: + - main + - develop + + jobs: + golangci: + name: lint + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-go@v4 + with: + go-version: '1.21' + cache: false + - name: golangci-lint + uses: golangci/golangci-lint-action@v3 + with: + version: v1.54 diff --git a/.golangci.yaml b/.golangci.yaml new file mode 100644 index 00000000..e7189369 --- /dev/null +++ b/.golangci.yaml @@ -0,0 +1,16 @@ +linters: + disable-all: true + enable: + - errcheck + - gosimple + - govet + - ineffassign + - staticcheck + - typecheck + - unused + - gosec + - godot + - forbidigo + - gocritic + - revive + - gofmt