forked from kellegous/go
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
43 lines (35 loc) · 1 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
language: go
go:
- 1.x
- master
addons:
apt:
update: true
services:
- postgresql
matrix:
# It's ok if our code fails on unstable development versions of Go.
allow_failures:
- go: master
# Don't wait for tip tests to finish. Mark the test run green if the
# tests pass on the stable versions of Go.
fast_finish: true
cache:
directories:
- .build
before-install:
- nvm install 8
install:
- gem install sass
- npm install -g typescript
- sudo apt-get install closure-compiler
- go get ./...
- make
before_script:
- GO_FILES=$(find . -iname '*.go' -type f | grep -v '/.build/\|/vendor/\|/web/bindata.go') # All the .go files, excluding vendor/ and .build/
- psql -c 'create database travis;' -U postgres
script:
- echo "$GO_FILES" && echo "||||" && echo "$(gofmt -l $GO_FILES)"
- test -z "$(gofmt -l $GO_FILES)" # Fail if a .go file hasn't been formatted with gofmt
- go vet ./... # go vet is the official Go static analyzer
- go test -v ./...