From f91669227add47529965cbe536680c38d4de744b Mon Sep 17 00:00:00 2001 From: Xabier Larrakoetxea Date: Sat, 23 May 2020 08:35:08 +0200 Subject: [PATCH 1/2] Set specific golangci-lint version on CI check step Signed-off-by: Xabier Larrakoetxea --- .github/workflows/ci.yml | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 454c345..412ed8a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,23 +6,11 @@ jobs: check: name: Check runs-on: ubuntu-latest + # Execute the checks inside the contianer instead the VM. + container: golangci/golangci-lint:v1.27.0-alpine steps: - - uses: actions/setup-go@v1 - with: - go-version: 1.13 - - name: Get golangci - run: | - # Add go binaries to GOPATH. - # FIX: https://github.com/actions/setup-go/issues/14 - export PATH=${PATH}:`go env GOPATH`/bin - go get -u github.com/golangci/golangci-lint/... - uses: actions/checkout@v1 - - name: check - run: | - # Add go binaries to GOPATH. - # FIX: https://github.com/actions/setup-go/issues/14 - export PATH=${PATH}:`go env GOPATH`/bin - make check + - run: golangci-lint run -E goimports test: name: Test @@ -31,5 +19,5 @@ jobs: - uses: actions/checkout@v1 - uses: actions/setup-go@v1 with: - go-version: 1.13 + go-version: 1.14 - run: make test From b0c7dfcc8e494df9939e5bc003eff83a4f3cf321 Mon Sep 17 00:00:00 2001 From: Xabier Larrakoetxea Date: Sat, 23 May 2020 08:43:04 +0200 Subject: [PATCH 2/2] Remove verbosity on tests Signed-off-by: Xabier Larrakoetxea --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index b8202fe..badbaf0 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ -UNIT_TEST_CMD := go test `go list ./... | grep -v vendor` -race -v -INTEGRATION_TEST_CMD := go test `go list ./... | grep -v vendor` -race -v -tags='integration' +UNIT_TEST_CMD := go test `go list ./... | grep -v vendor` -race +INTEGRATION_TEST_CMD := go test `go list ./... | grep -v vendor` -race -tags='integration' BENCHMARK_CMD := go test `go list ./... | grep -v vendor` -benchmem -bench=. CHECK_CMD = golangci-lint run -E goimports DEPS_CMD := go mod tidy