Workaround Codeship coverage upload report issues

Codeship / Codecov docs are incorrect, but it seems I could make it work with this workaround.
This commit is contained in:
Mickael Remond 2018-01-02 16:21:45 +01:00
parent fb5911564c
commit 51d6759354
No known key found for this signature in database
GPG key ID: E6F6045D79965AA3
4 changed files with 7 additions and 12 deletions

View file

@ -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 ./...
RUN go get -t ./...

View file

@ -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.

View file

@ -3,6 +3,3 @@
- name: test
service: build
command: ./test.sh
- name: codecov
service: build
command: bash -c "curl -s https://codecov.io/bash"

View file

@ -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
done
./codecov.sh