-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwercker.yml
More file actions
38 lines (32 loc) · 1.11 KB
/
wercker.yml
File metadata and controls
38 lines (32 loc) · 1.11 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
box: golang:1.12-alpine
services:
- name: postgres
id: postgres:9.6-alpine
env:
POSTGRES_PASSWORD: secretpassword
POSTGRES_USER: postgres
POSTGRES_DB: postgres
build:
steps:
- setup-go-workspace
- script:
name: set environment
code: |
export KUDZU_DATABASE_URL="user=postgres dbname=postgres host=${POSTGRES_PORT_5432_TCP_ADDR} port=5432 password=secretpassword sslmode=disable"
export POSTGRES_PASSWORD=secretpassword
- script:
name: go version
code: |
go version
- script:
name: install build tooling
code: |
apk --no-cache add build-base git
- script:
name: go test
code: |
echo
go test -i -installsuffix "static" ./cmd/... ./pkg/...
go test -v -installsuffix "static" -coverprofile=$WERCKER_REPORT_ARTEFACTS_DIR/coverage.out -p 1 ./cmd/... ./pkg/...
go tool cover -html=$WERCKER_REPORT_ARTEFACTS_DIR/coverage.out -o $WERCKER_REPORT_ARTEFACTS_DIR/coverage.html
go tool cover -func=$WERCKER_REPORT_ARTEFACTS_DIR/coverage.out