chore: update go, mods, workflow & linter #4
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: golangci | |
on: | |
pull_request: | |
jobs: | |
main: | |
name: lint | |
runs-on: ubuntu-latest | |
env: | |
GOLANGCI_LINT_VERSION: v1.60 | |
CGO_ENABLED: 0 | |
steps: | |
# https://github.com/marketplace/actions/checkout | |
- name: Check out code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
# https://github.com/marketplace/actions/setup-go-environment | |
- name: Set up Go ${{ env.GO_VERSION }} | |
uses: actions/setup-go@v5 | |
with: | |
go-version-file: 'go.mod' | |
- name: Check and get dependencies | |
run: | | |
go mod tidy | |
git diff --exit-code go.mod | |
git diff --exit-code go.sum | |
go mod download | |
# https://github.com/marketplace/actions/golangci-lint | |
- name: golangci-lint | |
uses: golangci/golangci-lint-action@v6 | |
with: | |
version: "${{ env.GOLANGCI_LINT_VERSION }}" |