File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : CI
2+
3+ on : [push, pull_request]
4+
5+ jobs :
6+ build-test-lint :
7+ runs-on : ubuntu-latest
8+ steps :
9+ - uses : actions/checkout@v4
10+ - name : Set up Go
11+ uses : actions/setup-go@v4
12+ with :
13+ go-version : ' 1.25'
14+ - name : Cache Go modules
15+ uses : actions/cache@v4
16+ with :
17+ path : ~/.cache/go-build
18+ key : ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
19+ - name : Install golangci-lint
20+ run : |
21+ curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.59.0
22+ - name : Lint
23+ run : golangci-lint run ./...
24+ - name : Test
25+ run : go test -v ./...
26+ - name : Build
27+ run : go build -v ./...
28+
Original file line number Diff line number Diff line change 1+ .PHONY : fmt lint test bench build docker
2+
3+ fmt :
4+ ifeq ($(shell test -e go.mod && echo yes) ,yes)
5+ gofmt -s -w .
6+ else
7+ prettier --write .
8+ endif
9+
10+ lint :
11+ golangci-lint run ./...
12+
13+ test :
14+ go test ./...
15+
16+ bench :
17+ go test -bench . -benchmem ./...
18+
19+ build :
20+ go build -o bin/app ./cmd/...
21+
22+ docker :
23+ docker build -t myorg/robot:latest .
24+
You can’t perform that action at this time.
0 commit comments