Skip to content

Commit 5eb46db

Browse files
authored
Merge pull request #33 from slok/slok/pin-golanci
2 parents dd38e68 + b0c7dfc commit 5eb46db

File tree

2 files changed

+6
-18
lines changed

2 files changed

+6
-18
lines changed

.github/workflows/ci.yml

+4-16
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,11 @@ jobs:
66
check:
77
name: Check
88
runs-on: ubuntu-latest
9+
# Execute the checks inside the contianer instead the VM.
10+
container: golangci/golangci-lint:v1.27.0-alpine
911
steps:
10-
- uses: actions/setup-go@v1
11-
with:
12-
go-version: 1.13
13-
- name: Get golangci
14-
run: |
15-
# Add go binaries to GOPATH.
16-
# FIX: https://github.com/actions/setup-go/issues/14
17-
export PATH=${PATH}:`go env GOPATH`/bin
18-
go get -u github.com/golangci/golangci-lint/...
1912
- uses: actions/checkout@v1
20-
- name: check
21-
run: |
22-
# Add go binaries to GOPATH.
23-
# FIX: https://github.com/actions/setup-go/issues/14
24-
export PATH=${PATH}:`go env GOPATH`/bin
25-
make check
13+
- run: golangci-lint run -E goimports
2614

2715
test:
2816
name: Test
@@ -31,5 +19,5 @@ jobs:
3119
- uses: actions/checkout@v1
3220
- uses: actions/setup-go@v1
3321
with:
34-
go-version: 1.13
22+
go-version: 1.14
3523
- run: make test

Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

2-
UNIT_TEST_CMD := go test `go list ./... | grep -v vendor` -race -v
3-
INTEGRATION_TEST_CMD := go test `go list ./... | grep -v vendor` -race -v -tags='integration'
2+
UNIT_TEST_CMD := go test `go list ./... | grep -v vendor` -race
3+
INTEGRATION_TEST_CMD := go test `go list ./... | grep -v vendor` -race -tags='integration'
44
BENCHMARK_CMD := go test `go list ./... | grep -v vendor` -benchmem -bench=.
55
CHECK_CMD = golangci-lint run -E goimports
66
DEPS_CMD := go mod tidy

0 commit comments

Comments
 (0)