gostations/bitbucket-pipelines.yml
2021-03-19 09:05:48 +00:00

23 lines
743 B
YAML

image: golang:1.15
pipelines:
default:
- parallel:
- step:
name: Test and Build
script:
- go mod vendor
- go mod tidy
- go test -v
- mkdir build
# go build -o build/gostations github.com/gmgauthier/gostations
- ./build.sh
- export BUILDPATH="build/$(uname)/gostations"
- curl -X POST --user "${BITBUCKET_USERNAME}:${BITBUCKET_APP_PASSWORD}" "https://api.bitbucket.org/2.0/repositories/${BITBUCKET_REPO_OWNER}/${BITBUCKET_REPO_SLUG}/downloads" --form files=@"${BUILDPATH}"
- step:
name: Lint code
image: golangci/golangci-lint:v1.31.0
script:
- golangci-lint run -v