From a6b003ccd39497076bac9cd39bd5130a28e32831 Mon Sep 17 00:00:00 2001 From: Mickael Remond Date: Mon, 1 Jan 2018 18:57:56 +0100 Subject: [PATCH] Add Codecov support --- .gitignore | 4 ++++ Dockerfile | 2 +- codeship-services.yml | 1 + codeship-steps.yml | 5 ++++- 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index ed9b0af..2b2d575 100755 --- a/.gitignore +++ b/.gitignore @@ -27,3 +27,7 @@ coverage.out .idea/ *.iml .DS_Store + +# Do not commit codeship key +codeship.aes +codeship.env \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 9d85906..9500f68 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ FROM golang:1.9 WORKDIR /go/src/fluux.io/xmpp COPY . ./ -RUN go get github.com/processone/mpg123 github.com/processone/soundcloud \ No newline at end of file +RUN go get -t -v ./... \ No newline at end of file diff --git a/codeship-services.yml b/codeship-services.yml index 2c7e7ff..bbb476e 100644 --- a/codeship-services.yml +++ b/codeship-services.yml @@ -2,3 +2,4 @@ build: build: image: fluux/build dockerfile: Dockerfile + encrypted_env_file: codeship.env.encrypted diff --git a/codeship-steps.yml b/codeship-steps.yml index b6d41ed..e53e3cb 100644 --- a/codeship-steps.yml +++ b/codeship-steps.yml @@ -2,4 +2,7 @@ steps: - name: test service: build - command: go test -v ./... + command: go test -race -coverprofile=coverage.txt -covermode=atomic ./... + - name: codecov + service: build + command: bash -c "curl -s https://codecov.io/bash"