forked from codebeaver-ai/codebeaver-ai
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgo.yml
30 lines (30 loc) · 1.24 KB
/
go.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
main_service: golang
services:
golang:
image: golang:1.21-bullseye
test_commands:
- export GOPATH="$HOME/go"
- export PATH=$PATH:$GOPATH/bin
- set -o pipefail && go test -v -json -covermode=atomic -coverprofile=coverage.out ./... -count=1 2>&1 | tee go-test-results.json
single_file_test_commands:
- export GOPATH="$HOME/go"
- export PATH=$PATH:$GOPATH/bin
- set -o pipefail && go test -v -json -covermode=atomic -coverprofile=coverage.out ./$(dirname "$FILE_TO_COVER") -count=1 2>&1 | tee go-test-results.json
setup_commands:
- apt-get update -qqy || true && apt-get install -qqy curl apt-utils git || true
- if [ -f "go.mod" ]; then go mod download; fi
- if [ -f "go.mod" ]; then go mod tidy; fi
- if [ -f "tools.go" ]; then go install $(go list -f '{{.Imports}}' tools.go | tr -d '[]'); fi
- go install golang.org/x/tools/cmd/goimports@latest || true
- go install golang.org/x/lint/golint@latest || true
- go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest || true
- go install honnef.co/go/tools/cmd/staticcheck@latest || true
- export GOPATH="$HOME/go"
- export PATH=$PATH:$GOPATH/bin
ignore:
- "**/vendor/**"
- "**/mock_*.go"
- "**/*.pb.go"
- "**/*.mock.go"
- "**/testdata/**"
- "**/mocks/**"