forked from google/periph
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
16 lines (15 loc) · 934 Bytes
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
language: go
sudo: false
go_import_path: periph.io/x/periph
go:
- 1.8.x
before_script:
- go get -t -v periph.io/x/periph/...
script:
- echo 'Check Code is well formatted'; ! gofmt -s -d . | read
- echo 'Looking for external dependencies:'; go list -f '{{join .Imports "\n"}}' periph.io/x/periph/... | sort | uniq | grep -v ^periph.io/x/periph | xargs go list -f '{{if not .Standard}}- {{.ImportPath}}{{end}}'
- echo 'Erroring on external dependencies:'; ! go list -f '{{join .Imports "\n"}}' periph.io/x/periph/... | sort | uniq | grep -v ^periph.io/x/periph | xargs go list -f '{{if not .Standard}}Remove {{.ImportPath}}{{end}}' | grep -q Remove
- 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)