forked from chain/Core
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwercker.yml
More file actions
63 lines (54 loc) · 1.73 KB
/
wercker.yml
File metadata and controls
63 lines (54 loc) · 1.73 KB
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: chaindev/wercker:20160923
# To update the docker image for this "box",
# see $CHAIN/docker/wercker.
services:
- id: clkao/postgres-plv8
env:
POSTGRES_PASSWORD: p
POSTGRES_USER: u
POSTGRES_DB: api-test
build:
steps:
- script:
name: fmt vet test imports
code: |
set -veo pipefail
go version
go env
export CHAIN=$GOPATH/src/chain
PATH=$GOPATH/bin:$PATH:$CHAIN/bin
cp -a $WERCKER_SOURCE_DIR $GOPATH/src/chain
export WERCKER_SOURCE_DIR=$GOPATH/src/chain
export DB_URL_TEST="postgres://u:p@$POSTGRES_PLV8_PORT_5432_TCP_ADDR:$POSTGRES_PLV8_PORT_5432_TCP_PORT/api-test?sslmode=disable"
cd $CHAIN
go vet $(go list ./...|grep -v vendor)
go install chain/cmd/vet
vet .
go install chain/log # needed before testing ./cmd/vet below
go test -cover $(go list ./...|grep -v vendor)
go generate $(go list ./...|grep -v vendor)
git diff --exit-code # make sure generated files are in sync
- script:
name: gofmt
code: |
test -z "$(go fmt $(go list ./...|grep -v vendor))"
test -z "$(./bin/gochainimports -l .|grep -v vendor)"
- script:
name: cfmt
code: |
bin/cfmt
git diff --exit-code
- script:
name: check for tk and xxx
code: |
p='(xxx|(tk)+)' # can't write inline or it'll match this file
if egrep -Iinr '//.*\b'$p'\b' $(ls -1|egrep -v 'vendor|generated')
then exit 1
fi
- inz/npm-install@1.1.5:
cwd: dashboard/
- script:
name: lint dashboard
cwd: dashboard/
code: |
npm run lint