move coveral report to docker

This commit is contained in:
Umputun
2018-05-23 00:30:56 -05:00
parent 535bda8948
commit 8291203d7a
2 changed files with 9 additions and 16 deletions
+1 -16
View File
@@ -1,21 +1,6 @@
language: go
go:
- "1.10.x"
before_install:
- go get golang.org/x/tools/cmd/cover
- go get github.com/mattn/goveralls
install:
- docker --version
- docker-compose --version
script:
- docker build .
after_success:
- echo 'America/Chicago' | sudo tee /etc/timezone
- sudo dpkg-reconfigure --frontend noninteractive tzdata
- go test $(go list -e ./... | grep -v vendor) -covermode=count -coverprofile=coverage.out
- goveralls -coverprofile=coverage.out -service=travis-ci -repotoken $COVERALLS_TOKEN
- docker build --build-arg COVERALLS_TOKEN=$COVERALLS_TOKEN .
+8
View File
@@ -1,5 +1,8 @@
FROM umputun/baseimage:buildgo-latest as build-backend
ARG COVERALLS_TOKEN
ENV COVERALLS_TOKEN=$COVERALLS_TOKEN
WORKDIR /go/src/github.com/umputun/remark
ADD app /go/src/github.com/umputun/remark/app
@@ -13,6 +16,11 @@ RUN gometalinter --disable-all --deadline=300s --vendor --enable=vet --enable=ve
RUN mkdir -p target && /script/coverage.sh
RUN if [ "x$COVERALLS_TOKEN" = "x" ] ; then \
echo coverall not enabled ; \
else go get github.com/mattn/goveralls && \
goveralls -coverprofile=.cover/cover.out -service=travis-ci -repotoken $COVERALLS_TOKEN; fi
ADD .git /go/src/github.com/umputun/remark/.git
RUN go build -o remark -ldflags "-X main.revision=$(git rev-parse --abbrev-ref HEAD)-$(git describe --abbrev=7 --always --tags)-$(date +%Y%m%d-%H:%M:%S) -s -w" ./app