refactor: build opt,arg,subcmd usage strings in code instead of in te… #271
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: ci | |
on: | |
push: | |
branches: [ "master" ] | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v3 | |
- name: Setup Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: 1.22.0 | |
- name: Build | |
run: go build -v ./... | |
- run: go install golang.org/x/tools/cmd/goimports@latest | |
- run: go install mvdan.cc/gofumpt@latest | |
- run: go install honnef.co/go/tools/cmd/staticcheck@latest | |
- name: Format | |
run: goimports -w . && gofumpt -w . | |
- name: Verify | |
run: | | |
if [ -n "$(git diff)" ]; then | |
git diff | |
exit 1 | |
fi | |
- name: Test | |
run: go test -v ./... | |
- name: Vet | |
run: go vet -v ./... | |
- name: staticcheck | |
run: staticcheck ./... |