-
Notifications
You must be signed in to change notification settings - Fork 20
/
wercker.yml
25 lines (25 loc) · 973 Bytes
/
wercker.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
box: pjvds/golang
# Build definition
build:
# The steps that will be executed on build
steps:
- script:
name: setup golang
code: |-
if test "${WERCKER_GIT_REPOSITORY+set}" == set; then mkdir -p "$GOPATH/src/$WERCKER_GIT_DOMAIN/$WERCKER_GIT_OWNER/$WERCKER_GIT_REPOSITORY"; else ln -s $WERCKER_SOURCE_DIR $GOPATH/src; fi
if test "${WERCKER_GIT_REPOSITORY+set}" == set; then cp -R $WERCKER_SOURCE_DIR/* "$GOPATH/src/$WERCKER_GIT_DOMAIN/$WERCKER_GIT_OWNER/$WERCKER_GIT_REPOSITORY"; fi
if test "${WERCKER_GIT_REPOSITORY+set}" == set; then export WERCKER_SOURCE_DIR="$GOPATH/src/$WERCKER_GIT_DOMAIN/$WERCKER_GIT_OWNER/$WERCKER_GIT_REPOSITORY"; fi
- script:
name: go get
code: |
cd $WERCKER_SOURCE_DIR
go version
go get -t ./...
- script:
name: go build
code: |
go build
- script:
name: go test
code: |
go test ./...