From 5b9cf096d3715eb0ee6b3dc2e908f958faf831b3 Mon Sep 17 00:00:00 2001 From: Hasan Turken Date: Thu, 14 Oct 2021 15:13:35 +0300 Subject: [PATCH 1/3] Fix linter error Signed-off-by: Hasan Turken --- config/rds/config.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/config/rds/config.go b/config/rds/config.go index d720795f2..f1424b7e8 100644 --- a/config/rds/config.go +++ b/config/rds/config.go @@ -17,8 +17,9 @@ limitations under the License. package rds import ( - "github.com/crossplane-contrib/provider-tf-aws/config/common" "github.com/crossplane-contrib/terrajet/pkg/config" + + "github.com/crossplane-contrib/provider-tf-aws/config/common" ) const ( From 50d6e9cf1fdbf4e577a4a4ab400b5f8b4b9662bf Mon Sep 17 00:00:00 2001 From: Hasan Turken Date: Thu, 14 Oct 2021 16:03:00 +0300 Subject: [PATCH 2/3] Skip go installation for golangci-lint-action Signed-off-by: Hasan Turken --- .github/workflows/ci.yml | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9f6a10436..8e628f251 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -67,14 +67,21 @@ jobs: - name: Vendor Dependencies run: make vendor vendor.check - # This action uses its own setup-go, which always seems to use the latest - # stable version of Go. We could run 'make lint' to ensure our desired Go - # version, but we prefer this action because it leaves 'annotations' (i.e. - # it comments on PRs to point out linter violations). + # Go version coming with golangci-lint-action may not be our desired + # go version. We deploy our desired go version and then skip go + # installation in golangci-lint-action in the next step as suggested + # in https://github.com/golangci/golangci-lint-action/issues/183 + - uses: actions/setup-go@v2 + with: + go-version: ${{ env.GO_VERSION }} + # We could run 'make lint' to ensure our desired Go version, but we + # prefer this action because it leaves 'annotations' (i.e. it comments + # on PRs to point out linter violations). - name: Lint uses: golangci/golangci-lint-action@v2 with: version: ${{ env.GOLANGCI_VERSION }} + skip-go-installation: true check-diff: runs-on: ubuntu-18.04 From 9ed9825beb1bda89ee8d3ecd5cf7480e5c6b03ec Mon Sep 17 00:00:00 2001 From: Hasan Turken Date: Thu, 14 Oct 2021 16:13:46 +0300 Subject: [PATCH 3/3] Increase golangci timeout Signed-off-by: Hasan Turken --- .github/workflows/ci.yml | 1 + .golangci.yml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8e628f251..39458b3fd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -82,6 +82,7 @@ jobs: with: version: ${{ env.GOLANGCI_VERSION }} skip-go-installation: true + args: --timeout 10m0s check-diff: runs-on: ubuntu-18.04 diff --git a/.golangci.yml b/.golangci.yml index 2a04a70be..1d50cf449 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,5 +1,5 @@ run: - deadline: 2m + deadline: 10m skip-files: - "zz_\\..+\\.go$"