From 3699213cf1a40109a9dbbf66e76dd1eca82ddb63 Mon Sep 17 00:00:00 2001 From: Enrique Llorente Pastora Date: Thu, 7 Apr 2022 16:14:12 +0200 Subject: [PATCH] actions: Remove lint (#1040) We have found weird issues with the actions and the feature it has of showing the line at the code review is not used much. This change move the lint to "check" target so it's run as part of prow unit-test. Signed-off-by: Enrique Llorente --- .github/workflows/check.yaml | 22 ---------------------- Makefile | 2 +- hack/lint.sh | 6 +++--- 3 files changed, 4 insertions(+), 26 deletions(-) delete mode 100644 .github/workflows/check.yaml diff --git a/.github/workflows/check.yaml b/.github/workflows/check.yaml deleted file mode 100644 index 50dee78848..0000000000 --- a/.github/workflows/check.yaml +++ /dev/null @@ -1,22 +0,0 @@ -name: checks -on: [push, pull_request] -jobs: - lint: - name: lint - runs-on: ubuntu-latest - steps: - - name: Check out code - uses: actions/checkout@v2 - - uses: arnested/go-version-action@v1 - id: go-version - - name: Set up Go - uses: actions/setup-go@v2 - with: - go-version: ${{ steps.go-version.outputs.minimal }} - - name: golangci-lint - uses: golangci/golangci-lint-action@v2 - env: - CGO_ENABLED: 0 - with: - version: v1.45.2 - args: --timeout 3m0s diff --git a/Makefile b/Makefile index a1ded0368f..1ab4405f11 100644 --- a/Makefile +++ b/Makefile @@ -92,7 +92,7 @@ SKIP_IMAGE_BUILD ?= false all: check handler -check: vet whitespace-check gofmt-check +check: lint vet whitespace-check gofmt-check format: whitespace-format gofmt diff --git a/hack/lint.sh b/hack/lint.sh index e29b8728ca..0df74bea3d 100755 --- a/hack/lint.sh +++ b/hack/lint.sh @@ -3,8 +3,8 @@ golangci_lint_version=v1.42.1 if [ ! -f $(go env GOPATH)/bin/golangci-lint ]; then curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin $golangci_lint_version fi -golangci-lint run +golangci-lint run --timeout 5m0s ( cd api - golangci-lint run --config ../.golangci.yml -) \ No newline at end of file + golangci-lint run --timeout 5m0s --config ../.golangci.yml +)