Skip to content

go version

go version #19

Workflow file for this run

name: Go
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
GO_VERSION: '1.23.1'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
- name: Build
run: go build -v ./...
- name: Test
run: go test -v ./...
- name: Vet
run: go vet -v ./...
- name: Tidy
run: go mod tidy -diff
- name: Check Go Format
run: |
fmt_output=$(go fmt ./...)
if [ -n "$fmt_output" ]; then
echo "Go code is not formatted according to go fmt."
echo "$fmt_output"
exit 1
fi
golangci:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
cache: false
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
version: v1.61.0