-
Notifications
You must be signed in to change notification settings - Fork 5
/
.travis.yml
60 lines (52 loc) · 1.99 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
56
57
58
59
60
language: go
go:
- '1.10.x'
stages:
- name: test
- name: release
if: tag IS present
- name: deploy
if: tag IS present
go_import_path: github.com/src-d/lookout-gometalint-analyzer
jobs:
include:
- name: 'Unit tests'
stage: test
script: make test
- name: 'Integration test: simple proxy'
install:
- go get -u gopkg.in/alecthomas/gometalinter.v2
- gometalinter.v2 --install
before_script:
- go build ./cmd/gometalint-proxy
script:
- ./gometalint-proxy ./_fixtures 2>&1 | tee -a proxy.log | grep "15 issues found"
after_failure:
- cat proxy.log
- gometalinter.v2 --disable-all --enable=dupl --enable=gas --enable=gofmt --enable=goimports --enable=lll --enable=misspell ./_fixtures
- name: 'Integration test: analyzer server'
before_script:
- make build
script:
- curl https://raw.githubusercontent.com/src-d/lookout-sdk/master/_tools/install-lookout-latest.sh | bash
- (./build/lookout-gometalint-analyzer_linux_amd64/gometalint-analyzer 2>&1 | tee -a analyzer.log)&
- ./lookout-sdk review --log-level=debug --from="86466b69281ca6bdcbc55413014ddb5a5ac4ce50" --to="a044e568d6b3bd6bf5ecf49fdd8c170de53fcb73"
- name: 'Check deps'
install:
- curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
script:
- dep ensure -v
- make no-changes-in-commit
- make build
- make no-changes-in-commit
- name: 'Push image to Docker Hub'
stage: release
script:
- PKG_OS=linux make packages
- make docker-push-latest-release
- name: 'Deploy to staging'
stage: deploy
install:
- make install-helm
script:
- HELM_RELEASE=lookout-gometalint-analyzer HELM_CHART=lookout-gometalint-analyzer K8S_NAMESPACE=lookout HELM_ARGS="--tiller-namespace=lookout --repo https://src-d.github.io/charts/stable/ --set image.tag=$TRAVIS_TAG -f .helm_staging.yml" make deploy