name: Test binaries
on:
push
jobs:
test release-action:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: 'stable'
- name: lint
run: go install golang.org/x/lint/golint@latest && golint ./...
- name: vet
run: go vet
- name: gofmt
run: gofmt -s -e -d .
- name: gocyclo
run: |
go install github.com/fzipp/gocyclo/cmd/gocyclo@latest
gocyclo -over 15 -avg .
- name: ineffassign
go install github.com/gordonklaus/ineffassign@latest
ineffassign .
- name: misspell
go install github.com/client9/misspell/cmd/misspell@latest
misspell -locale US .
- name: Go Build Linux x64
GOOS=linux GOARCH=amd64 \
go build \
-ldflags="-s -w" \
-o linux-amd64
- name: Go Build Linux arm64
GOOS=linux GOARCH=arm64 \
-o linux-arm64
- name: Go Build Windows x64
GOOS=windows GOARCH=amd64 \
-o windows-amd64.exe
- name: Go Build Windows arm64
GOOS=windows GOARCH=arm64 \
-o windows-arm64.exe