language: go

go:
  - 1.10.x
  - 1.11.x

go_import_path: github.com/sourcegraph/go-langserver

os:
  - windows
  - linux

branches:
  only:
    - master

install:
  - go get -d -t ./...
  - go get golang.org/x/lint/golint
  - go test -i ./...

script:
  - cd $TRAVIS_BUILD_DIR
  - go test -timeout 5m -race ./...

language: go

go:
  - 1.10.x
  - 1.11.x

go_import_path: github.com/sourcegraph/go-langserver

os:
  - windows
  - linux

branches:
  only:
    - master

install:
  - go get -d -t ./...
  - go get golang.org/x/lint/golint
  - go test -i ./...

script:
  - cd $TRAVIS_BUILD_DIR
  # Travis windows is changing line endings, breaking tests. Switch to LF.
  - find langserver -type f -print0 | xargs -0 sed -i ':a;N;$!ba;s/\r//g'
  - go test -timeout 5m -race ./...

Use sed to convert CRLF to LF line endings
ci: Use sed to convert CRLF to LF line endings

Travis windows support seems to be checking out files with windows file endings,
breaking our tests. So adjust line endings in travis.

Signed-off-by: Christian Witts <54d9443fc0677c5d0e45d3480abd0c71b03493bb@gmail.com>
