Skip to content

Commit 3f7cbb3

Browse files
committed
test(Makefile):: add target for tests with code coverage
1 parent 43a66c9 commit 3f7cbb3

4 files changed

Lines changed: 11 additions & 2 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ rootfs/bin/boot
22
vendor/
33
rootfs/usr/bin/
44
./builder
5+
coverage.txt

.travis.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,6 @@ sudo: required
1313
install:
1414
- make bootstrap
1515
script:
16-
- make test build docker-build
16+
- make test-cover build docker-build
17+
after_success:
18+
- bash <(curl -s https://codecov.io/bash)

Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export GO15VENDOREXPERIMENT=1
77

88
# dockerized development environment variables
99
REPO_PATH := github.com/deis/${SHORT_NAME}
10-
DEV_ENV_IMAGE := quay.io/deis/go-dev:0.12.0
10+
DEV_ENV_IMAGE := quay.io/deis/go-dev:0.13.0
1111
DEV_ENV_WORK_DIR := /go/src/${REPO_PATH}
1212
DEV_ENV_PREFIX := docker run --rm -e GO15VENDOREXPERIMENT=1 -v ${CURDIR}:${DEV_ENV_WORK_DIR} -w ${DEV_ENV_WORK_DIR}
1313
DEV_ENV_CMD := ${DEV_ENV_PREFIX} ${DEV_ENV_IMAGE}
@@ -41,6 +41,9 @@ build:
4141
test:
4242
${DEV_ENV_CMD} sh -c 'go test $$(glide nv)'
4343

44+
test-cover:
45+
${DEV_ENV_CMD} test-cover.sh
46+
4447
update-changelog:
4548
${DEV_ENV_PREFIX} -e RELEASE=${WORKFLOW_RELEASE} ${DEV_ENV_IMAGE} gen-changelog.sh \
4649
| cat - CHANGELOG.md > tmp && mv tmp CHANGELOG.md

codecov.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
codecov:
2+
branch: master
3+
slug: "deis/builder"

0 commit comments

Comments
 (0)