Skip to content

Commit 63ecbe8

Browse files
author
Dean Karn
authored
Merge pull request #172 from go-playground/general-maint
General maint
2 parents c330e11 + 1b0efae commit 63ecbe8

File tree

3 files changed

+16
-42
lines changed

3 files changed

+16
-42
lines changed

.github/workflows/workflow.yml

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,36 +6,37 @@ on:
66

77
name: Test
88
jobs:
9-
lint:
10-
name: Lint
9+
golangci:
10+
name: lint
1111
runs-on: ubuntu-latest
1212
steps:
13-
- name: Check out code
14-
uses: actions/checkout@v2
15-
16-
- name: Run linter
17-
uses: golangci/golangci-lint-action@v2
13+
- uses: actions/setup-go@v3
14+
with:
15+
go-version: 1.20.x
16+
- uses: actions/checkout@v3
17+
- name: golangci-lint
18+
uses: golangci/golangci-lint-action@v3
1819
with:
19-
version: v1.35.2
20+
version: latest
2021

2122
test:
2223
name: Test
2324
strategy:
2425
matrix:
25-
go-version: [1.14.x, 1.15.x]
26+
go-version: [1.17.x, 1.18.x, 1.20.x]
2627
os: [ubuntu-latest, macos-latest]
2728
runs-on: ${{ matrix.os }}
2829
steps:
2930
- name: Install Go
30-
uses: actions/setup-go@v2
31+
uses: actions/setup-go@v3
3132
with:
3233
go-version: ${{ matrix.go-version }}
3334

3435
- name: Checkout code
35-
uses: actions/checkout@v2
36+
uses: actions/checkout@v3
3637

3738
- name: Restore cache
38-
uses: actions/cache@v2
39+
uses: actions/cache@v3
3940
with:
4041
path: ~/go/pkg/mod
4142
key: ${{ runner.os }}-v1-go-${{ hashFiles('**/go.sum') }}
@@ -46,7 +47,7 @@ jobs:
4647
run: go test -race -covermode=atomic -coverprofile="coverage.out" ./...
4748

4849
- name: Upload coverage report to Coveralls
49-
if: matrix.os == 'ubuntu-latest' && matrix.go-version == '1.15.x'
50+
if: matrix.os == 'ubuntu-latest' && matrix.go-version == '1.18.x'
5051
uses: shogo82148/actions-goveralls@v1
5152
with:
5253
path-to-profile: coverage.out

.golangci.yml

Lines changed: 0 additions & 16 deletions
This file was deleted.

Makefile

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,10 @@
1-
GOPATH=$(shell go env GOPATH)
2-
31
all: lint test
42

5-
linters-install:
6-
@echo "+ $@"
7-
@$(GOPATH)/bin/golangci-lint --version >/dev/null 2>&1 || { \
8-
echo "Install golangci-lint..."; \
9-
curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(GOPATH)/bin; \
10-
}
11-
123
lint: linters-install
13-
@echo "+ $@"
14-
$(GOPATH)/bin/golangci-lint run ./...
4+
golangci-lint run --timeout 5m
155

166
test:
17-
@echo "+ $@"
18-
GO111MODULE=on go test -covermode=atomic -race ./...
7+
go test -covermode=atomic -race ./...
198

209
.PHONY: test lint linters-install
2110
.DEFAULT_GOAL := all

0 commit comments

Comments
 (0)