Added travis config

This commit is contained in:
Mike Farah 2017-02-13 07:28:48 +11:00
parent 6ee9db9a70
commit e3fc944709
3 changed files with 19 additions and 11 deletions

4
.travis.yml Normal file
View File

@ -0,0 +1,4 @@
language: go
go:
- 1.7.x
script: ./ci.sh

14
ci.sh Executable file
View File

@ -0,0 +1,14 @@
#!/bin/bash
golint
go test
go build
# acceptance test
X=$(./yaml w sample.yaml b.c 3 | ./yaml r - b.c)
if [ $X != 3 ]
then
echo "Failed acceptance test: expected 2 but was $X"
exit 1
fi

View File

@ -1,17 +1,7 @@
#!/bin/bash
gofmt -w .
golint
go test
go build
# acceptance test
X=$(./yaml w sample.yaml b.c 3 | ./yaml r - b.c)
if [ $X != 3 ]
then
echo "Failed acceptance test: expected 2 but was $X"
exit 1
fi
./ci.sh
go install