Merge branch 'maruel-fast_fast' into dev
This commit is contained in:
commit
efa01a585b
|
@ -23,7 +23,8 @@ before_script:
|
||||||
- sh -e /etc/init.d/xvfb start
|
- sh -e /etc/init.d/xvfb start
|
||||||
script:
|
script:
|
||||||
- echo "Ensuring code is well formatted"; ! gofmt -s -d . | read
|
- echo "Ensuring code is well formatted"; ! gofmt -s -d . | read
|
||||||
- ./ci/travis.sh
|
- bash -c 'set -e; echo "" > coverage.txt; for d in $(go list ./...); do go test -covermode=count -coverprofile=p.out $d; if [ -f p.out ]; then cat p.out >> coverage.txt; rm p.out; fi; done'
|
||||||
|
- go test -race ./...
|
||||||
after_success:
|
after_success:
|
||||||
- bash <(curl -s https://codecov.io/bash)
|
- bash <(curl -s https://codecov.io/bash)
|
||||||
branches:
|
branches:
|
||||||
|
|
52
Makefile
52
Makefile
|
@ -1,20 +1,17 @@
|
||||||
PACKAGES := gobot gobot/api gobot/drivers/gpio gobot/drivers/aio gobot/drivers/i2c gobot/platforms/firmata/client gobot/platforms/intel-iot/edison gobot/platforms/intel-iot/joule gobot/platforms/parrot/ardrone gobot/platforms/parrot/bebop gobot/platforms/parrot/minidrone gobot/platforms/sphero/ollie gobot/platforms/sphero/bb8 gobot/sysfs $(shell ls ./platforms | sed -e 's/^/gobot\/platforms\//')
|
.PHONY: test cover robeaux examples deps
|
||||||
.PHONY: test cover robeaux examples
|
|
||||||
|
|
||||||
test:
|
test:
|
||||||
go test -i ./...
|
go test ./...
|
||||||
for package in $(PACKAGES) ; do \
|
|
||||||
go test gobot.io/x/$$package ; \
|
|
||||||
done ; \
|
|
||||||
|
|
||||||
cover:
|
cover:
|
||||||
echo "" > profile.cov
|
echo "" > profile.cov
|
||||||
go test -i ./...
|
for package in $$(go list ./...) ; do \
|
||||||
for package in $(PACKAGES) ; do \
|
go test -covermode=count -coverprofile=tmp.cov $$package ; \
|
||||||
go test -covermode=count -coverprofile=tmp.cov gobot.io/x/$$package ; \
|
if [ -f tmp.cov ]; then \
|
||||||
cat tmp.cov >> profile.cov ; \
|
cat tmp.cov >> profile.cov ; \
|
||||||
rm tmp.cov ; \
|
rm tmp.cov ; \
|
||||||
done ; \
|
fi ; \
|
||||||
|
done
|
||||||
|
|
||||||
robeaux:
|
robeaux:
|
||||||
ifeq (,$(shell which go-bindata))
|
ifeq (,$(shell which go-bindata))
|
||||||
|
@ -42,18 +39,19 @@ examples:
|
||||||
done ; \
|
done ; \
|
||||||
|
|
||||||
deps:
|
deps:
|
||||||
go get -d -v github.com/bmizerany/pat
|
go get -d -v \
|
||||||
go get -d -v github.com/hybridgroup/go-ardrone/client
|
github.com/bmizerany/pat \
|
||||||
go get -d -v github.com/mgutz/logxi/v1
|
github.com/codegangsta/cli \
|
||||||
go get -d -v golang.org/x/sys/unix
|
github.com/currantlabs/ble \
|
||||||
go get -d -v github.com/currantlabs/ble
|
github.com/donovanhide/eventsource \
|
||||||
go get -d -v github.com/tarm/serial
|
github.com/eclipse/paho.mqtt.golang \
|
||||||
go get -d -v github.com/veandco/go-sdl2/sdl
|
github.com/hashicorp/go-multierror \
|
||||||
go get -d -v golang.org/x/net/websocket
|
github.com/hybridgroup/go-ardrone/client \
|
||||||
go get -d -v github.com/eclipse/paho.mqtt.golang
|
github.com/lazywei/go-opencv \
|
||||||
go get -d -v github.com/nats-io/nats
|
github.com/mgutz/logxi/v1 \
|
||||||
go get -d -v github.com/lazywei/go-opencv
|
github.com/nats-io/nats \
|
||||||
go get -d -v github.com/donovanhide/eventsource
|
github.com/sigurn/crc8 \
|
||||||
go get -d -v github.com/hashicorp/go-multierror
|
github.com/tarm/serial \
|
||||||
go get -d -v github.com/sigurn/crc8
|
github.com/veandco/go-sdl2/sdl \
|
||||||
go get -d -v github.com/codegangsta/cli
|
golang.org/x/net/websocket \
|
||||||
|
golang.org/x/sys/unix
|
||||||
|
|
19
ci/travis.sh
19
ci/travis.sh
|
@ -1,19 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
PACKAGES=('gobot' 'gobot/api' 'gobot/sysfs' 'gobot/drivers/gpio' 'gobot/drivers/aio' 'gobot/drivers/i2c' 'gobot/platforms/firmata/client' 'gobot/platforms/intel-iot/edison' 'gobot/platforms/intel-iot/joule' 'gobot/platforms/parrot/ardrone' 'gobot/platforms/parrot/bebop' 'gobot/platforms/parrot/minidrone' 'gobot/platforms/sphero/ollie' 'gobot/platforms/sphero/bb8' $(ls ./platforms | sed -e 's/^/gobot\/platforms\//'))
|
|
||||||
EXITCODE=0
|
|
||||||
|
|
||||||
echo "" > coverage.txt
|
|
||||||
go test -i ./...
|
|
||||||
|
|
||||||
for package in "${PACKAGES[@]}"
|
|
||||||
do
|
|
||||||
go test -covermode=count -coverprofile=tmp.cov gobot.io/x/$package
|
|
||||||
if [ $? -ne 0 ]
|
|
||||||
then
|
|
||||||
EXITCODE=1
|
|
||||||
fi
|
|
||||||
if [ -f tmp.cov ]; then
|
|
||||||
cat tmp.cov >> coverage.txt
|
|
||||||
rm tmp.cov
|
|
||||||
fi
|
|
||||||
done
|
|
Loading…
Reference in New Issue