Skip to content

Commit

Permalink
[TASK] use circle ci for build artifacts
Browse files Browse the repository at this point in the history
  • Loading branch information
genofire committed Nov 7, 2017
1 parent 93321ab commit 6edc51c
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 2 deletions.
8 changes: 7 additions & 1 deletion .test-coverage
@@ -1,6 +1,12 @@
#!/bin/bash
# Issue: https://github.com/mattn/goveralls/issues/20
# Source: https://github.com/uber/go-torch/blob/63da5d33a225c195fea84610e2456d5f722f3963/.test-cover.sh
CI=$1
echo "run for $CI"

if [ "$CI" == "circle-ci" ]; then
cd ${GOPATH}/src/github.com/${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}
fi

echo "mode: count" > profile.cov
FAIL=0
Expand All @@ -20,7 +26,7 @@ done

# Failures have incomplete results, so don't send
if [ "$FAIL" -eq 0 ]; then
goveralls -service=travis-ci -v -coverprofile=profile.cov
goveralls -service=$CI -v -coverprofile=profile.cov
bash <(curl -s https://codecov.io/bash) -t $CODECOV_TOKEN -f profile.cov
fi

Expand Down
2 changes: 1 addition & 1 deletion .travis.yml
Expand Up @@ -7,5 +7,5 @@ install:
- go get github.com/mattn/goveralls
- go get golang.org/x/tools/cmd/cover
script:
- ./.test-coverage
- ./.test-coverage travis-ci
- go install github.com/FreifunkBremen/yanic
1 change: 1 addition & 0 deletions README.md
Expand Up @@ -9,6 +9,7 @@ Yet another node info collector
```

[![Build Status](https://travis-ci.org/FreifunkBremen/yanic.svg?branch=master)](https://travis-ci.org/FreifunkBremen/yanic)
[![CircleCI](https://circleci.com/gh/FreifunkBremen/yanic/tree/master.svg?style=shield)](https://circleci.com/gh/FreifunkBremen/yanic/tree/master)
[![Coverage Status](https://coveralls.io/repos/github/FreifunkBremen/yanic/badge.svg?branch=master)](https://coveralls.io/github/FreifunkBremen/yanic?branch=master)
[![codecov](https://codecov.io/gh/FreifunkBremen/yanic/branch/master/graph/badge.svg)](https://codecov.io/gh/FreifunkBremen/yanic)
[![Go Report Card](https://goreportcard.com/badge/github.com/FreifunkBremen/yanic)](https://goreportcard.com/report/github.com/FreifunkBremen/yanic)
Expand Down
36 changes: 36 additions & 0 deletions circle.yml
@@ -0,0 +1,36 @@
version: 2
jobs:
build:
docker:
- image: circleci/golang:1.8
- image: circleci/golang:1.8.1
- image: circleci/golang:latest
working_directory: /go/src/github.com/FreifunkBremen/yanic
steps:
- checkout
- run: go get -t -d -v ./...
- run: go install github.com/FreifunkBremen/yanic
- store_artifacts:
path: /go/bin/
destination: yanic
test:
docker:
- image: circleci/golang:1.8
- image: circleci/golang:1.8.1
- image: circleci/golang:latest
working_directory: /go/src/github.com/FreifunkBremen/yanic
steps:
- checkout
- run: go get -t -d -v ./...
- run: go get github.com/mattn/goveralls
- run: go get golang.org/x/tools/cmd/cover
- run: ./.test-coverage circle-ci
- store_test_results:
path: ./
destination: profile.cov
workflows:
version: 2
build_and_test:
jobs:
- build
- test

0 comments on commit 6edc51c

Please sign in to comment.