-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcircle.yml
35 lines (31 loc) · 925 Bytes
/
circle.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
machine:
environment:
GOPATH: "$HOME/.go_workspace"
IMPORT_PATH: "github.com/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME"
BUILD_PATH: "$GOPATH/src/$IMPORT_PATH"
checkout:
post:
- mkdir -p "$GOPATH/src/$IMPORT_PATH"
- rm -rf "$GOPATH/src/$IMPORT_PATH"
- rsync -azC --delete ./ "$GOPATH/src/$IMPORT_PATH/"
dependencies:
cache_directories:
- /home/ubuntu/go
pre:
- bash -c "$(curl -fsSL https://gist.githubusercontent.com/newtonlabs/aff90370d4cf8bc3ea2e/raw)"
- go version
override:
- cd "$BUILD_PATH" && make deps
- cd "$BUILD_PATH" && make build
test:
override:
- cd "$BUILD_PATH" && make vet
- cd "$BUILD_PATH" && make test
post:
- cp "$BUILD_PATH/unit-tests.xml" "$CIRCLE_TEST_REPORTS/unit-tests.xml"
deployment:
release:
branch: master
commands:
- cd "$BUILD_PATH" && make docker-build
- cd "$BUILD_PATH" && make release