From dbe3261e13a25e40c205bdec91b409584e862640 Mon Sep 17 00:00:00 2001 From: Tomas Turek Date: Thu, 1 Aug 2024 09:50:43 +0200 Subject: [PATCH] github-actiom: Add linter workflow to run golangci-lint --- .github/workflows/linter.yml | 24 ++++++++++++++++++++++++ .golangci.yml | 1 + 2 files changed, 25 insertions(+) create mode 100644 .github/workflows/linter.yml diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml new file mode 100644 index 000000000..6297f653d --- /dev/null +++ b/.github/workflows/linter.yml @@ -0,0 +1,24 @@ +name: linter +on: + workflow_dispatch: + push: + branches: [ "main", "release*" ] + tags: [ "*" ] + pull_request: + branches: [ "main", "release*" ] + +jobs: + golangci: + runs-on: ubuntu-latest + steps: + - name: Check out code + uses: actions/checkout@v4 + - name: Install Go + uses: actions/setup-go@v5 + with: + go-version-file: 'go.mod' + - name: golangci-lint + uses: golangci/golangci-lint-action@v6 + with: + version: v1.59 + args: --verbose \ No newline at end of file diff --git a/.golangci.yml b/.golangci.yml index aed8644d1..e0817c79f 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -22,6 +22,7 @@ linters: - dupl - errcheck - exportloopref + - ginkgolinter - goconst - gocyclo - gofmt