mirror of https://github.com/lightninglabs/loop
build: add travis config
parent
83e8d17d62
commit
a83824bbb5
@ -0,0 +1,25 @@
|
|||||||
|
language: go
|
||||||
|
cache:
|
||||||
|
directories:
|
||||||
|
- $GOCACHE
|
||||||
|
- $GOPATH/pkg/mod
|
||||||
|
- $GOPATH/src/github.com/btcsuite
|
||||||
|
- $GOPATH/src/github.com/golang
|
||||||
|
- $GOPATH/src/gopkg.in/alecthomas
|
||||||
|
|
||||||
|
go:
|
||||||
|
- "1.11.x"
|
||||||
|
|
||||||
|
env:
|
||||||
|
global:
|
||||||
|
- GOCACHE=$HOME/.go-build
|
||||||
|
|
||||||
|
sudo: required
|
||||||
|
|
||||||
|
script:
|
||||||
|
- export GO111MODULE=on
|
||||||
|
- make unit
|
||||||
|
|
||||||
|
after_script:
|
||||||
|
- echo "Uploading to termbin.com..." && find *.log | xargs -I{} sh -c "cat {} | nc termbin.com 9999 | xargs -r0 printf '{} uploaded to %s'"
|
||||||
|
- echo "Uploading to file.io..." && tar -zcvO *.log | curl -s -F 'file=@-;filename=logs.tar.gz' https://file.io | xargs -r0 printf 'logs.tar.gz uploaded to %s\n'
|
@ -0,0 +1,15 @@
|
|||||||
|
PKG := github.com/lightninglabs/loop
|
||||||
|
|
||||||
|
GOTEST := GO111MODULE=on go test -v
|
||||||
|
|
||||||
|
GOLIST := go list $(PKG)/... | grep -v '/vendor/'
|
||||||
|
|
||||||
|
XARGS := xargs -L 1
|
||||||
|
|
||||||
|
TEST_FLAGS = -test.timeout=20m
|
||||||
|
|
||||||
|
UNIT := $(GOLIST) | $(XARGS) env $(GOTEST) $(TEST_FLAGS)
|
||||||
|
|
||||||
|
unit:
|
||||||
|
@$(call print, "Running unit tests.")
|
||||||
|
$(UNIT)
|
Loading…
Reference in New Issue