This repository has been archived on 2024-06-01. You can view files and clone it, but cannot push or open issues or pull requests.
release-action/.gitea/workflows/test.yaml
Evan 9536b306c6
All checks were successful
Test binaries / test release-action (push) Successful in 23s
Include full test suite
2024-01-18 09:45:03 -05:00

57 lines
1.5 KiB
YAML

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
run: |
go install github.com/gordonklaus/ineffassign@latest
ineffassign .
- name: misspell
run: |
go install github.com/client9/misspell/cmd/misspell@latest
misspell -locale US .
- name: Go Build Linux x64
run: |
GOOS=linux GOARCH=amd64 \
go build \
-ldflags="-s -w" \
-o linux-amd64
- name: Go Build Linux arm64
run: |
GOOS=linux GOARCH=arm64 \
go build \
-ldflags="-s -w" \
-o linux-arm64
- name: Go Build Windows x64
run: |
GOOS=windows GOARCH=amd64 \
go build \
-ldflags="-s -w" \
-o windows-amd64.exe
- name: Go Build Windows arm64
run: |
GOOS=windows GOARCH=arm64 \
go build \
-ldflags="-s -w" \
-o windows-arm64.exe