2015-04-06 18:32:53 +03:00
|
|
|
box: wercker/golang
|
2015-04-06 18:29:54 +03:00
|
|
|
|
|
|
|
# Build definition
|
|
|
|
build:
|
|
|
|
# The steps that will be executed on build
|
|
|
|
steps:
|
2015-04-06 18:35:03 +03:00
|
|
|
# Lint the project
|
|
|
|
- script:
|
|
|
|
name: go lint
|
|
|
|
code: |
|
2015-04-06 18:39:02 +03:00
|
|
|
go get -u github.com/golang/lint/golint && golint
|
2015-04-06 18:35:03 +03:00
|
|
|
# Test the project
|
2015-04-07 16:43:11 +03:00
|
|
|
- script:
|
|
|
|
name: go get
|
|
|
|
code: |
|
|
|
|
go get ./...
|
|
|
|
# Test the project
|
2015-04-06 18:35:03 +03:00
|
|
|
- script:
|
|
|
|
name: go test
|
|
|
|
code: |
|
|
|
|
go test
|
2015-04-06 18:29:54 +03:00
|
|
|
|
|
|
|
# A custom script step, name value is used in the UI
|
|
|
|
# and the code value contains the command that get executed
|
|
|
|
- script:
|
|
|
|
name: echo golang information
|
|
|
|
code: |
|
|
|
|
echo "go version $(go -v) running"
|