fix: apply code-review and insight findings across nuntius
This commit is contained in:
@@ -22,7 +22,13 @@ jobs:
|
||||
- name: gofmt
|
||||
# `gofmt -l` prints the names of unformatted files. An empty
|
||||
# output is the only acceptable result.
|
||||
run: gofmt -l cmd internal pkg
|
||||
run: |
|
||||
unformatted=$(gofmt -l cmd internal pkg)
|
||||
if [ -n "$unformatted" ]; then
|
||||
echo "The following files need gofmt:"
|
||||
echo "$unformatted"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: go vet
|
||||
run: go vet ./...
|
||||
@@ -45,3 +51,25 @@ jobs:
|
||||
|
||||
- name: go test ./examples
|
||||
run: go build ./examples/...
|
||||
|
||||
build:
|
||||
runs-on: fedora
|
||||
needs: test
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: "1.26"
|
||||
|
||||
- name: Download dependencies
|
||||
run: go mod download
|
||||
|
||||
- name: Build
|
||||
run: go build -ldflags="-s -w" -o bin/nuntius ./cmd/server
|
||||
|
||||
- name: Test
|
||||
run: go test ./...
|
||||
|
||||
- name: Smoke test
|
||||
run: ./bin/nuntius --version
|
||||
|
||||
Reference in New Issue
Block a user