Skip to content
This repository has been archived by the owner on Feb 24, 2024. It is now read-only.

Commit

Permalink
Add codecov.io integration.
Browse files Browse the repository at this point in the history
  • Loading branch information
AlekSi committed Jun 2, 2018
1 parent 0e9cb35 commit cafca1c
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 1 deletion.
15 changes: 14 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,20 @@ services:
install: true

script:
- docker build .
- docker build
--build-arg CODECOV_TOKEN=$CODECOV_TOKEN
--build-arg CI=$CI
--build-arg TRAVIS=$TRAVIS
--build-arg TRAVIS_BRANCH=$TRAVIS_BRANCH
--build-arg TRAVIS_COMMIT=$TRAVIS_COMMIT
--build-arg TRAVIS_JOB_ID=$TRAVIS_JOB_ID
--build-arg TRAVIS_JOB_NUMBER=$TRAVIS_JOB_NUMBER
--build-arg TRAVIS_OS_NAME=$TRAVIS_OS_NAME
--build-arg TRAVIS_PULL_REQUEST=$TRAVIS_PULL_REQUEST
--build-arg TRAVIS_PULL_REQUEST_SHA=$TRAVIS_PULL_REQUEST_SHA
--build-arg TRAVIS_REPO_SLUG=$TRAVIS_REPO_SLUG
--build-arg TRAVIS_TAG=$TRAVIS_TAG
.

addons:
code_climate:
Expand Down
19 changes: 19 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
FROM gobuffalo/buffalo:development

ARG CODECOV_TOKEN
ARG CI
ARG TRAVIS
ARG TRAVIS_BRANCH
ARG TRAVIS_COMMIT
ARG TRAVIS_JOB_ID
ARG TRAVIS_JOB_NUMBER
ARG TRAVIS_OS_NAME
ARG TRAVIS_PULL_REQUEST
ARG TRAVIS_PULL_REQUEST_SHA
ARG TRAVIS_REPO_SLUG
ARG TRAVIS_TAG

RUN buffalo version

RUN go get -u github.com/alecthomas/gometalinter
Expand Down Expand Up @@ -29,6 +42,12 @@ RUN go get -v -t ./...
RUN go install -v -tags sqlite ./buffalo

RUN go test -tags sqlite -race ./...
RUN go test -tags sqlite -coverprofile cover.out -covermode count ./...

RUN if [ -z "$CODECOV_TOKEN" ] ; then \
echo codecov not enabled ; \
else curl -s https://codecov.io/bash -o codecov && \
bash codecov -f cover.out -X fix; fi

RUN gometalinter --vendor --deadline=5m ./...

Expand Down

0 comments on commit cafca1c

Please sign in to comment.