Skip to content

Commit

Permalink
Add travis-ci integration
Browse files Browse the repository at this point in the history
  • Loading branch information
Tarmigan Casebolt committed May 8, 2016
1 parent 8f6b208 commit 37be519
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
9 changes: 9 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
language: go
go:
- 1.4
- 1.6
- tip
env:
- GOOS=linux CGO=1
- GOOS=linux CGO=0
- GOOS=windows GOARCH=386
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[![GoDoc](https://godoc.org/github.com/tarm/serial?status.svg)](http://godoc.org/github.com/tarm/serial)
[![Build Status](https://travis-ci.org/tarm/serial.svg?branch=master)](https://travis-ci.org/tarm/serial)

Serial
========
Expand Down
10 changes: 8 additions & 2 deletions basic_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,19 @@
package serial

import (
"os"
"testing"
"time"
)

func TestConnection(t *testing.T) {
c0 := &Config{Name: "/dev/ttyUSB0", Baud: 115200}
c1 := &Config{Name: "/dev/ttyUSB1", Baud: 115200}
port0 := os.Getenv("PORT0")
port1 := os.Getenv("PORT1")
if port0 == "" || port1 == "" {
t.Skip("Skipping test because PORT0 or PORT1 environment variable is not set")
}
c0 := &Config{Name: port0, Baud: 115200}
c1 := &Config{Name: port1, Baud: 115200}

s1, err := OpenPort(c0)
if err != nil {
Expand Down

0 comments on commit 37be519

Please sign in to comment.