Skip to content

Commit

Permalink
Add Codeship / Codecov support
Browse files Browse the repository at this point in the history
  • Loading branch information
mremond committed Jan 5, 2018
1 parent 2762ce5 commit c51402b
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,6 @@ coverage.out
.DS_Store

*.coverprofile

codeship.aes
codeship.env
5 changes: 5 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FROM golang:1.9
WORKDIR /go/src/fluux.io/gomqtt
RUN curl -o codecov.sh -s https://codecov.io/bash && chmod +x codecov.sh
COPY . ./
# RUN go get -t ./...
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Native Go MQTT Library

[ ![Codeship Status for FluuxIO/gomqtt](https://app.codeship.com/projects/75c09d70-d43d-0135-b59a-12b6e6b26eee/status?branch=master)](https://app.codeship.com/projects/262977) [![codecov](https://codecov.io/gh/FluuxIO/gomqtt/branch/master/graph/badge.svg)](https://codecov.io/gh/FluuxIO/gomqtt)

This is an MQTT v3.1.1 client library written in Go.

The library is inspired by my Go XMPP library (gox) and tries to use similar consistent API.
Expand Down
5 changes: 5 additions & 0 deletions codeship-services.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
build:
build:
image: fluux/build
dockerfile: Dockerfile
encrypted_env_file: codeship.env.encrypted
5 changes: 5 additions & 0 deletions codeship-steps.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
- type: serial
steps:
- name: test
service: build
command: ./test.sh
1 change: 1 addition & 0 deletions codeship.env.encrypted
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
w6RyOnfthqGrK5MFUPdhRRzEyxpktPitJ70wsNd1v2K8XkIQq2ZRAF2JivBdaCpx+PQOsK/iz/hlBQ1Z2e8I3ErE
14 changes: 14 additions & 0 deletions test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/usr/bin/env bash

set -e
echo "" > coverage.txt

for d in $(go list ./... | grep -v vendor); do
go test -race -coverprofile=profile.out -covermode=atomic ${d}
if [ -f profile.out ]; then
cat profile.out >> coverage.txt
rm profile.out
fi
done

./codecov.sh

0 comments on commit c51402b

Please sign in to comment.