codeclimate/test-reporter

View on GitHub
integration-tests/gocov/Dockerfile

Summary

Maintainability
Test Coverage
FROM golang:1.8.1

ENV CCTR=$GOPATH/src/github.com/codeclimate/test-reporter
RUN mkdir -p $CCTR
WORKDIR $CCTR
COPY . .
RUN go install -v

WORKDIR $CCTR/formatters
RUN go test -coverprofile=c.out
RUN mv c.out $CCTR
WORKDIR $CCTR

RUN echo "testing" > ignore.me
RUN git config --global user.email "you@example.com"
RUN git config --global user.name "Your Name"
RUN git add ignore.me
RUN git commit -m "testing"

ENV CC_TEST_REPORTER_ID=c4881e09870b0fac1291c93339b36ffe36210a2645c1ad25e52d8fda3943fb4d
RUN test-reporter format-coverage -d
RUN cat coverage/codeclimate.json
RUN test-reporter upload-coverage -d -s 2