From 51d67593546b434452bcef2632c804cffada46e5 Mon Sep 17 00:00:00 2001 From: Mickael Remond Date: Tue, 2 Jan 2018 16:21:45 +0100 Subject: [PATCH] Workaround Codeship coverage upload report issues Codeship / Codecov docs are incorrect, but it seems I could make it work with this workaround. --- Dockerfile | 8 ++------ README.md | 2 +- codeship-steps.yml | 3 --- test.sh | 6 ++++-- 4 files changed, 7 insertions(+), 12 deletions(-) diff --git a/Dockerfile b/Dockerfile index 91ef0e5..b293749 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,5 @@ FROM golang:1.9 WORKDIR /go/src/fluux.io/xmpp +RUN curl -o codecov.sh -s https://codecov.io/bash && chmod +x codecov.sh COPY . ./ -RUN apt-get update \ - && apt-get install -y \ - git \ - --no-install-recommends \ - && rm -rf /var/lib/apt/lists/* -RUN go get -t -v ./... \ No newline at end of file +RUN go get -t ./... diff --git a/README.md b/README.md index f2b5aa5..ba8f235 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Go XMPP library -[ ![Codeship Status for FluuxIO/xmpp](https://app.codeship.com/projects/dba7f300-d145-0135-6c51-26e28af241d2/status?branch=master)](https://app.codeship.com/projects/262399) +[ ![Codeship Status for FluuxIO/xmpp](https://app.codeship.com/projects/dba7f300-d145-0135-6c51-26e28af241d2/status?branch=master)](https://app.codeship.com/projects/262399) [![codecov](https://codecov.io/gh/FluuxIO/xmpp/branch/master/graph/badge.svg)](https://codecov.io/gh/FluuxIO/xmpp) Fluux XMPP is a Go XMPP library, focusing on simplicity, simple automation, and IoT. diff --git a/codeship-steps.yml b/codeship-steps.yml index e9d19be..5528b3d 100644 --- a/codeship-steps.yml +++ b/codeship-steps.yml @@ -3,6 +3,3 @@ - name: test service: build command: ./test.sh - - name: codecov - service: build - command: bash -c "curl -s https://codecov.io/bash" diff --git a/test.sh b/test.sh index 80d33f9..14782ff 100755 --- a/test.sh +++ b/test.sh @@ -4,9 +4,11 @@ set -e echo "" > coverage.txt for d in $(go list ./... | grep -v vendor); do - go test -race -coverprofile=profile.out -covermode=atomic $d + go test -race -coverprofile=profile.out -covermode=atomic ${d} if [ -f profile.out ]; then cat profile.out >> coverage.txt rm profile.out fi -done \ No newline at end of file +done + +./codecov.sh \ No newline at end of file