Skip to content

Commit

Permalink
Initialise travis-ci
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandrebodin committed Jul 8, 2018
1 parent 280d4fc commit 40a2856
Show file tree
Hide file tree
Showing 6 changed files with 92 additions and 2 deletions.
21 changes: 21 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
language: go

env:
- DEP_VERSION="0.4.1"

before_install:
# Download the binary to bin folder in $GOPATH
- curl -L -s https://github.com/golang/dep/releases/download/v${DEP_VERSION}/dep-linux-amd64 -o $GOPATH/bin/dep
# Make the binary executable
- chmod +x $GOPATH/bin/dep

install:
- dep ensure

go:
- "1.8"
- "1.9"
- "1.10"

script:
- make test.ci
31 changes: 30 additions & 1 deletion Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions Gopkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,7 @@
[[constraint]]
branch = "master"
name = "github.com/pkg/browser"

[[constraint]]
name = "github.com/stretchr/testify"
version = "1.2.2"
12 changes: 11 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,14 @@ release:
clean:
@echo "Clean dist/"
@rm -rf dist
.PHONY: clean
.PHONY: clean

test:
@echo "Running test"
@go test ./...
.PHONY: test

test.ci:
@echo "Running test"
@go test -v ./...
.PHONY: test.ci
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# tmuxctl

[![Build Status](https://travis-ci.org/alexandrebodin/tmuxctl.svg?branch=master)](https://travis-ci.org/alexandrebodin/tmuxctl) [![Go Report Card](https://goreportcard.com/badge/github.com/alexandrebodin/tmuxctl)](https://goreportcard.com/report/github.com/alexandrebodin/tmuxctl)

Tmuxctl is a tmux session manager. Read the [documentation](https://tmuxctl.netlify.com/) for instructions and examples.

## Quick start
Expand Down
24 changes: 24 additions & 0 deletions config/config_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package config_test

import (
"bytes"
"testing"

"github.com/alexandrebodin/tmuxctl/config"
"github.com/stretchr/testify/assert"
)

type ReaderString struct {
*bytes.Reader
}

func (r ReaderString) Close() error {
return nil
}

func TestParse(t *testing.T) {
reader := ReaderString{bytes.NewReader([]byte("lala"))}

_, err := config.Parse(reader)
assert.Error(t, err)
}

0 comments on commit 40a2856

Please sign in to comment.