Skip to content

Commit

Permalink
Update: Support golang v1.19 (#63)
Browse files Browse the repository at this point in the history
  • Loading branch information
Eric Powers authored Aug 18, 2022
1 parent c0be8d4 commit d0ef560
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 9 deletions.
26 changes: 19 additions & 7 deletions .github/workflows/build-go.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@ jobs:
fail-fast: false
matrix:
go:
- 1.15
- 1.16
- 1.17
- 1.18
- 1.19
steps:
- uses: actions/checkout@v2

Expand All @@ -31,11 +32,22 @@ jobs:
- name: setup
run: |
go version
go get github.com/golangci/golangci-lint/cmd/golangci-lint@latest
go get github.com/securego/gosec/cmd/gosec
#go get golang.org/x/tools/cmd/cover
go get github.com/axw/gocov/gocov
go get github.com/AlekSi/gocov-xml
go install github.com/securego/gosec/cmd/gosec@latest
#go install golang.org/x/tools/cmd/cover@latest
go install github.com/axw/gocov/gocov@master
go install github.com/AlekSi/gocov-xml@latest
- name: setup-for-older-go
if: ${{ matrix.go <= 1.17 }}
run: |
# stay on an older version of golangci-lint which still builds against 1.17
# This is due to the introduction of generics.
go install github.com/golangci/golangci-lint/cmd/[email protected]
- name: setup-for-newer-go
if: ${{ matrix.go > 1.17 }}
run: |
go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
- name: build
run: |
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ SHELL := /bin/bash -o pipefail

export GO111MODULE = on

default: lint test sec
default: lint test

lint:
golangci-lint run \
Expand All @@ -12,7 +12,7 @@ lint:
--enable=errcheck \
--enable=goimports \
--enable=ineffassign \
--enable=golint \
--enable=revive \
--enable=unused \
--enable=structcheck \
--enable=staticcheck \
Expand Down

0 comments on commit d0ef560

Please sign in to comment.