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:
parent
fb5911564c
commit
51d6759354
|
@ -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 ./...
|
||||
|
|
|
@ -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.
|
||||
|
||||
|
|
|
@ -3,6 +3,3 @@
|
|||
- name: test
|
||||
service: build
|
||||
command: ./test.sh
|
||||
- name: codecov
|
||||
service: build
|
||||
command: bash -c "curl -s https://codecov.io/bash"
|
||||
|
|
4
test.sh
4
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
|
||||
|
||||
./codecov.sh
|
Loading…
Reference in a new issue