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

58 lines
1.5 KiB
YAML
Raw Normal View History

2023-12-01 13:29:57 -05:00
name: Test binaries
on:
2023-12-04 15:27:21 -05:00
push
2023-12-01 13:29:57 -05:00
jobs:
2024-01-18 09:45:03 -05:00
test release-action:
2023-12-01 13:29:57 -05:00
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
2023-12-01 13:29:57 -05:00
with:
go-version: 'stable'
- name: lint
run: go install golang.org/x/lint/golint@latest && golint ./...
- name: vet
run: go vet
2024-01-18 09:45:03 -05:00
- 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 .
2023-12-01 13:29:57 -05:00
- 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