* ci: Update linter to 1.59.1. Also remove deprecated linter "vetshadow", its functionality is now included in the "govet" linter. * ci: Add new linters. - fatcontext - Detects nested contexts in loops. - mirror - Reports wrong mirror patterns of bytes/strings usage. - nilnil - Checks that there is no simultaneous return of nil error and an invalid value. - usestdlibvars - detect the possibility to use variables/constants from the Go standard library.
23 lines
718 B
YAML
23 lines
718 B
YAML
name: Build and Test
|
|
on: [push, pull_request]
|
|
jobs:
|
|
build:
|
|
name: Go CI
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
go: ["1.21", "1.22"]
|
|
steps:
|
|
- name: Set up Go
|
|
uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 #v5.0.1
|
|
with:
|
|
go-version: ${{ matrix.go }}
|
|
- name: Check out source
|
|
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b #v4.1.5
|
|
- name: Build
|
|
run: go build ./...
|
|
- name: Install Linters
|
|
run: "curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.59.1"
|
|
- name: Test and Lint
|
|
run: ./run_tests.sh
|