From c679b29051fca321956008ee192e4ec5edad1177 Mon Sep 17 00:00:00 2001 From: Markus Pesch Date: Sun, 19 Jan 2020 15:15:00 +0100 Subject: [PATCH] fix(ci): add codecov --- .travis.yml | 14 ++++++++------ Makefile | 9 +++------ 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/.travis.yml b/.travis.yml index c886003..0f71b7a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,12 +7,14 @@ jobs: include: - stage: build script: make container-run/all - -deploy: - - provider: script - script: make container-run/release/all - on: - tags: true + # Disabled (Missing postgres db) + # - stage: test + # script: make container-run/test/unit + - stage: test + script: make container-run/test/unit + after_script: bash <(curl -s https://codecov.io/bash) + - stage: deploy + script: make container-image/push notifications: email: diff --git a/Makefile b/Makefile index 0be6402..0bc042f 100644 --- a/Makefile +++ b/Makefile @@ -189,10 +189,7 @@ test/goldenfiles/bindata.go: # ============================================================================== PHONY+=test/unit test/unit: clean bindata - go test -coverprofile coverage.html -v ./... - -test/cover-html: test/unit - go tool cover -html coverage.html + go test -v -race -coverprofile=coverage.txt -covermode=atomic $(shell go list ./... | grep -v db) # PACKAGES # ============================================================================== @@ -259,8 +256,8 @@ container-run/bindata: # CONTAINER STEPS - TEST # ============================================================================== -PHONY+=container-run/test -container-run/test: +PHONY+=container-run/test/unit +container-run/test/unit: $(MAKE) container-run COMMAND=${@:container-run/%=%} # CONTAINER STEPS - OTHER STUF