DEV 1253: Upgrade to Go 1.18.1 (#70)

* fix dependency that breaks on go 1.18.1

* upgrade to go 1.18.1

* upgrade golangci-lint to a version that works with go 1.18
This commit is contained in:
Rob O'Dwyer 2022-05-02 13:57:07 -07:00 committed by GitHub
parent d378759d58
commit 1c3f434841
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 20 additions and 12 deletions

View file

@ -2,6 +2,9 @@ name: Test
on: [push, pull_request]
env:
GO_VERSION: 1.18.1
jobs:
format:
@ -11,7 +14,7 @@ jobs:
- uses: actions/checkout@main
- uses: actions/setup-go@main
with:
go-version: '1.17'
go-version: '${{ env.GO_VERSION }}'
- name: Run gofmt
run: test -z $(gofmt -l .) || (gofmt -d . && exit 1)
@ -23,10 +26,10 @@ jobs:
- uses: actions/checkout@main
- uses: actions/setup-go@main
with:
go-version: '1.17'
go-version: '${{ env.GO_VERSION }}'
- name: Run golangci-lint
run: |
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.43.0
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.45.2
golangci-lint run -v ./...
test:
@ -37,7 +40,7 @@ jobs:
- uses: actions/checkout@main
- uses: actions/setup-go@main
with:
go-version: '1.17'
go-version: '${{ env.GO_VERSION }}'
- name: Run go test
run: go test -race -coverprofile=coverage.txt ./...
- name: Upload coverage to codecov.io
@ -56,7 +59,7 @@ jobs:
- uses: actions/checkout@main
- uses: actions/setup-go@main
with:
go-version: '1.17'
go-version: '${{ env.GO_VERSION }}'
- name: Run go build
run: |
go build ./cli/battlesnake