Skip to content

Commit

Permalink
Update build infrastructure
Browse files Browse the repository at this point in the history
  • Loading branch information
twpayne committed Jan 25, 2023
1 parent ee58ee8 commit af90dec
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 28 deletions.
33 changes: 13 additions & 20 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,36 +12,29 @@ jobs:
strategy:
matrix:
go-version:
- 1.16.x
- 1.17.x
- stable
- oldstable
steps:
- name: Set up Go
uses: actions/setup-go@v1
- uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b
- uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568
with:
cache: true
go-version: ${{ matrix.go-version }}
- name: Cache Go modules
uses: actions/cache@v1
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go${{ matrix.go-version }}-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go${{ matrix.go-version }}-
- name: Checkout
uses: actions/checkout@v2
- name: Build
run: go build ./...
- name: Test
run: go test -covermode=atomic -coverprofile=profile.cov -race ./...
- name: Upload coverage
uses: shogo82148/actions-goveralls@v1
- uses: shogo82148/actions-goveralls@v1
with:
path-to-profile: profile.cov
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Lint
uses: golangci/golangci-lint-action@v2
- uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b
- uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568
with:
cache: true
go-version: stable
- uses: golangci/golangci-lint-action@0ad9a0988b3973e851ab0a07adf248ec2e100376
with:
version: v1.43
version: v1.50.1
16 changes: 8 additions & 8 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ linters:
- bidichk
- bodyclose
- contextcheck
- deadcode
- depguard
- dogsled
- dupl
Expand All @@ -13,7 +12,6 @@ linters:
- errname
- errorlint
- exhaustive
- exhaustivestruct
- exportloopref
- forbidigo
- forcetypeassert
Expand All @@ -37,7 +35,6 @@ linters:
- gosec
- gosimple
- govet
- ifshort
- importas
- ineffassign
- ireturn
Expand All @@ -54,10 +51,7 @@ linters:
- predeclared
- promlinter
- revive
- rowserrcheck
- sqlclosecheck
- staticcheck
- structcheck
- stylecheck
- tagliatelle
- tenv
Expand All @@ -68,8 +62,6 @@ linters:
- unconvert
- unparam
- unused
- varcheck
- wastedassign
- whitespace
- wrapcheck
disable:
Expand All @@ -78,10 +70,18 @@ linters:
- gomnd
- lll
- nlreturn
- rowserrcheck # https://github.com/golangci/golangci-lint/issues/264
- sqlclosecheck # https://github.com/golangci/golangci-lint/issues/264
- varnamelen
- wastedassign # https://github.com/golangci/golangci-lint/issues/264
- wsl

linters-settings:
gci:
sections:
- standard
- default
- prefix(github.com/twpayne/go-polyline)
goimports:
local-prefixes: github.com/twpayne/go-polyline

Expand Down

0 comments on commit af90dec

Please sign in to comment.