-
Notifications
You must be signed in to change notification settings - Fork 10
/
wercker.yml
56 lines (48 loc) · 1.84 KB
/
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
box: wercker/golang
build:
steps:
- pjvds/setup-go-workspace
# - script:
# name: Populate cache
# code: |-
# # BEFORE YOU COPY AND USE THIS STEP IN YOUR OWN BUILD PIPELINE
# # MAKE SURE YOU SET $WERCKER_SOURCE_DIR TO THE PACKAGE DIRECTORY
# # OR YOUR PROJECT, LIKE: $GOPATH/github.com/pjvds/httpcallback.io
# if test -d "$WERCKER_CACHE_DIR/go-pkg-cache"; then rsync -avzv --exclude "$WERCKER_SOURCE_DIR" "$WERCKER_CACHE_DIR/go-pkg-cache/" "$GOPATH/" ; fi
- script:
name: Get dependencies
code: go get -v ./...
- script:
name: Build
code: |
go build -a -v ./...
- script:
name: Test
code: |-
go get launchpad.net/gocheck
go get github.com/axw/gocov/gocov
go test ./...
# - script:
# name: Coverage
# code: |-
# go get github.com/matm/gocov-html
# gocov report coverage.json
# gocov-html coverage.json > $WERCKER_REPORT_ARTIFACTS_DIR/coverage.html
# - script:
# name: Coveralls.io
# code: |-
# # The COVERALLS_TOKEN is set in the project at
# # wercker as project environment variable.
# go get github.com/mattn/goveralls
# goveralls -package="./..." -service='wercker.com' $COVERALLS_TOKEN
# - script:
# name: Benchmark
# code: |-
# go test -test.bench ./...
- script:
name: Store cache
code: |-
# BEFORE YOU COPY AND USE THIS STEP IN YOUR OWN BUILD PIPELINE
# MAKE SURE YOU SET $WERCKER_SOURCE_DIR TO THE PACKAGE DIRECTORY
# OR YOUR PROJECT, LIKE: $GOPATH/github.com/pjvds/httpcallback.io
rsync -avzv --exclude "$WERCKER_SOURCE_DIR" "$GOPATH/" "$WERCKER_CACHE_DIR/go-pkg-cache/"