Skip to content

Commit e3fc944

Browse files
author
Mike Farah
committed
Added travis config
1 parent 6ee9db9 commit e3fc944

File tree

3 files changed

+19
-11
lines changed

3 files changed

+19
-11
lines changed

.travis.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
language: go
2+
go:
3+
- 1.7.x
4+
script: ./ci.sh

ci.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/bin/bash
2+
3+
golint
4+
go test
5+
go build
6+
7+
# acceptance test
8+
X=$(./yaml w sample.yaml b.c 3 | ./yaml r - b.c)
9+
10+
if [ $X != 3 ]
11+
then
12+
echo "Failed acceptance test: expected 2 but was $X"
13+
exit 1
14+
fi

precheckin.sh

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,7 @@
11
#!/bin/bash
22

33
gofmt -w .
4-
golint
5-
go test
6-
go build
74

8-
# acceptance test
9-
X=$(./yaml w sample.yaml b.c 3 | ./yaml r - b.c)
10-
11-
if [ $X != 3 ]
12-
then
13-
echo "Failed acceptance test: expected 2 but was $X"
14-
exit 1
15-
fi
5+
./ci.sh
166

177
go install

0 commit comments

Comments
 (0)