-
Notifications
You must be signed in to change notification settings - Fork 2
/
.travis.yml
55 lines (43 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
44
45
46
47
48
49
50
51
52
53
54
55
dist: trusty
sudo: required
language: go
cache:
directories:
- $HOME/.cache/pip
- $HOME/.cache/pre-commit
go:
- 1.13.x
addons:
apt:
packages:
- python
- python-dev
- python-pip
branches:
only:
- gh-pages
- develop
- "/release-*/"
- "/^v\\d+\\.\\d+(\\.\\d+)?(-\\S*)?$/"
stages:
- linting
jobs:
include:
- stage: linting
name: "pre-commit"
before_install:
install:
- sudo pip install --upgrade pip
- sudo pip install yapf==v0.29.0
- sudo pip install pre-commit
- go get -u golang.org/x/lint/golint
script: pre-commit run --all --show-diff-on-failure
after_success:
- export BRANCH=$(if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then echo $TRAVIS_BRANCH; else echo $TRAVIS_PULL_REQUEST_BRANCH; fi)
notifications:
webhooks:
urls:
- https://webhooks.gitter.im/e/c917f392fcc5a7120514
on_success: change
on_failure: always
on_start: never