language: go
sudo: false
go_import_path: periph.io/x/periph
go:
  - 1.8.1
before_script:
  - go get -t -v periph.io/x/periph/...
script:
  - echo "Ensuring code is well formatted"; ! gofmt -s -d . | read
  - go test -race ./...
  - bash -c 'set -e; echo "" > coverage.txt; for d in $(go list ./...); do go test -covermode=count -coverprofile=p.out $d; if [ -f p.out ]; then cat p.out >> coverage.txt; rm p.out; fi; done'
after_success:
  - bash <(curl -s https://codecov.io/bash)

language: go
sudo: false
go_import_path: periph.io/x/periph
go:
  - 1.8.1
before_script:
  - go get -t -v periph.io/x/periph/...
script:
  - echo 'Check Code is well formatted'; ! gofmt -s -d . | read
  - echo 'Check No external dependency'; ! go list -f '{{ .ImportPath }}' ./... | grep -v '^periph\.io/x/periph'
  - go test -race ./...
  - bash -c 'set -e; echo "" > coverage.txt; for d in $(go list ./...); do go test -covermode=count -coverprofile=p.out $d; if [ -f p.out ]; then cat p.out >> coverage.txt; rm p.out; fi; done'
after_success:
  - bash <(curl -s https://codecov.io/bash)

Add check to not depend on any external dependency
Add check to not depend on any external dependency

It is important to note that ':' cannot be used in commands. This is news to me
and I'm not 100% sure why it is the case.
