Skip to content

Commit

Permalink
ci: Add Travis CI configuration
Browse files Browse the repository at this point in the history
Add Travis CI configuration file to have a CI for the repo.
  • Loading branch information
ifraixedes committed Aug 1, 2018
1 parent 4ba5abd commit ec63bf8
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
language: go

go:
- "1.x"

before_install:
# setup some env vars
- GO_FILES=$(find . -iname '*.go' | grep -v /vendor/) # All the .go files, excluding vendor/
- PKGS=$(go list ./... | grep -v /vendor/) # All the import paths, excluding vendor/

- make go-tools-install

# Install goveralls, Go integration for Coveralls.io.
- go get -u github.com/mattn/goveralls

install:
- dep ensure

script:
- test -z $(gofmt -s -l $GO_FILES) # Fail if a .go file hasn't been formatted with gofmt
- make lint
- go test -v -covermode=count -coverprofile=profile.cov $PKGS
- goveralls -coverprofile=profile.cov -service=travis-ci

0 comments on commit ec63bf8

Please sign in to comment.