gha: update actions/setup-go@v5, actions/checkout@v4, golangci-lint to v1.62.2, test against go1.22, go1.23 (latest, latest -1) #140
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test | |
on: [push, pull_request] | |
jobs: | |
test: | |
strategy: | |
matrix: | |
go: ["1.18.x", "1.22.x", "1.23.x"] | |
platform: [ubuntu-latest, windows-latest, macos-latest] | |
runs-on: ${{ matrix.platform }} | |
steps: | |
- name: Install Go ${{ matrix.go }} | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ matrix.go }} | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Test | |
run: go test -v ./... | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: go mod tidy | |
run: | | |
go mod tidy | |
git diff --exit-code | |
- name: Lint | |
run: | | |
docker run --rm -v ./:/go/src/github.com/moby/term -w /go/src/github.com/moby/term \ | |
golangci/golangci-lint:v1.62.2 golangci-lint run -v \ | |
-E gofmt \ | |
-E misspell \ | |
-E revive |