From d419347dd31adbf2ed6e027605d9c616702b9eda Mon Sep 17 00:00:00 2001 From: cn Date: Thu, 13 Dec 2018 16:33:37 +0100 Subject: [PATCH] module: setup Travis CI --- .travis.yml | 9 +++++++++ Makefile | 21 +++++++++++++++++++++ README.md | 2 ++ 3 files changed, 32 insertions(+) create mode 100644 .travis.yml create mode 100644 Makefile diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..c4eb842 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,9 @@ +--- +sudo: false +language: go +go: + - "1.11.x" + - master + +env: + - GO111MODULE=on diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..3567402 --- /dev/null +++ b/Makefile @@ -0,0 +1,21 @@ +.POSIX: + +.PHONY: all +all: clean build test + +.PHONY: run +run: clean build test + sudo cmd/munin-miflora/munin-miflora xyz 00:00:00:00:00:00 + +.PHONY: clean +clean: + rm -f cmd/munin-miflora/munin-miflora + +.PHONY: build +build: cmd/munin-miflora/munin-miflora + +.PHONY: test +test: build + +cmd/munin-miflora/munin-miflora: + cd cmd/munin-miflora && go build && cd ../.. diff --git a/README.md b/README.md index 6557982..f16be8b 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # miflorad +[![Build Status](https://travis-ci.org/cmur2/miflorad.svg?branch=master)](https://travis-ci.org/cmur2/miflorad) + This project aims to produce tools written in Go for interfacing with Xiaomi Flora sensors for IoT use cases. ## Misc