From d6402cae871907189f6b99793d69ecedeb2dcab1 Mon Sep 17 00:00:00 2001 From: Haytham AbuelFutuh Date: Wed, 12 Feb 2020 21:45:34 -0800 Subject: [PATCH] Add CodeGov (#66) --- flytepropeller/.travis.yml | 2 +- flytepropeller/Makefile | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/flytepropeller/.travis.yml b/flytepropeller/.travis.yml index ee5823e7d8..c76bde1229 100644 --- a/flytepropeller/.travis.yml +++ b/flytepropeller/.travis.yml @@ -23,4 +23,4 @@ jobs: - stage: test name: unit tests install: make install - script: make test_unit + script: make test_unit_codecov diff --git a/flytepropeller/Makefile b/flytepropeller/Makefile index 7cb82584e1..758e13bc04 100644 --- a/flytepropeller/Makefile +++ b/flytepropeller/Makefile @@ -14,7 +14,7 @@ linux_compile: .PHONY: compile compile: mkdir -p ./bin - go build -o bin/flytepropeller ./cmd/controller/main.go + go build -o bin/flytepropeller ./cmd/controller/main.go go build -o bin/kubectl-flyte ./cmd/kubectl-flyte/main.go && cp bin/kubectl-flyte ${GOPATH}/bin cross_compile: @@ -27,7 +27,7 @@ op_code_generate: @RESOURCE_NAME=flyteworkflow OPERATOR_PKG=github.com/lyft/flytepropeller ./hack/update-codegen.sh benchmark: - mkdir -p ./bin/benchmark + mkdir -p ./bin/benchmark @go test -run=^$ -bench=. -cpuprofile=cpu.out -memprofile=mem.out ./pkg/controller/nodes/. && mv *.out ./bin/benchmark/ && mv *.test ./bin/benchmark/ # server starts the service in development mode @@ -42,3 +42,7 @@ clean: golden: go test ./cmd/kubectl-flyte/cmd -update go test ./pkg/compiler/test -update + +.PHONY: test_unit_codecov +test_unit_codecov: + go test ./... -race -coverprofile=coverage.txt -covermode=atomic; curl -s https://codecov.io/bash > codecov_bash.sh; bash codecov_bash.sh