blob: e5f741917ac086a56c09e758d1c3a9eaf634cdd0 [file] [log] [blame] [edit]
definitions:
steps:
- step: &Verify
script:
- PACKAGE_PATH="${GOPATH}/src/bitbucket.org/${BITBUCKET_REPO_OWNER}/${BITBUCKET_REPO_SLUG}"
- mkdir -pv "${PACKAGE_PATH}"
- tar -cO --exclude-vcs --exclude=bitbucket-pipelines.yml . | tar -xv -C "${PACKAGE_PATH}"
- cd "${PACKAGE_PATH}"
- go version # log the version of Go we are using in this step
- export GO111MODULE=on # enable modules inside $GOPATH
- go get -v ./...
- go build -v ./...
- go test -v -race -cpu=1,4 ./...
- go vet -v ./...
- go run honnef.co/go/tools/cmd/staticcheck ./...
pipelines:
default: # run on each push
- step:
image: golang:1.21
<<: *Verify
- step:
image: golang:1.22
<<: *Verify