mirror of
https://github.com/mikefarah/yq.git
synced 2024-11-13 22:38:04 +00:00
Added travis config
This commit is contained in:
parent
6ee9db9a70
commit
e3fc944709
4
.travis.yml
Normal file
4
.travis.yml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
language: go
|
||||||
|
go:
|
||||||
|
- 1.7.x
|
||||||
|
script: ./ci.sh
|
14
ci.sh
Executable file
14
ci.sh
Executable 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
|
@ -1,17 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
gofmt -w .
|
gofmt -w .
|
||||||
golint
|
|
||||||
go test
|
|
||||||
go build
|
|
||||||
|
|
||||||
# acceptance test
|
./ci.sh
|
||||||
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
|
|
||||||
|
|
||||||
go install
|
go install
|
||||||
|
Loading…
Reference in New Issue
Block a user