-
Notifications
You must be signed in to change notification settings - Fork 11
/
.travis.yml
113 lines (98 loc) · 2.84 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
dist: xenial
sudo: required
language: generic
go_import_path: gopkg.in/src-d/lookout-sdk.v0
git:
depth: false
stages:
- name: test
- name: release
if: tag IS present
jobs:
include:
- name: 'Linters'
stage: test
language: python
python: '3.6'
install:
- pip3 install --upgrade pycodestyle
script:
- pycodestyle --max-line-length=99 --exclude='./python/lookout/sdk' .
- name: 'Python: example integration tests'
stage: test
language: python
python: '3.6'
install:
- ./_tools/ci-run-bblfsh.sh
- pip3 install -e python
script:
- ./_tools/install-lookout-latest.sh
- (python3 -u examples/language-analyzer.py |& tee ./py-analyzer.log)&
- sleep 5s
- ./lookout-sdk review --log-level=debug --from 0a9d1d159d2b0064c32df8d2287b174a91390b1a --to HEAD |& tee ./sdk.log
- grep -v -i "error" ./py-analyzer.log > /dev/null
- grep -v -i "error" ./sdk.log > /dev/null
- &golangIntegrationTest
name: 'Golang 1.12: example integration tests'
stage: test
language: go
go: '1.12'
install:
- go version
- go get ./examples
script:
- ./_tools/ci-run-bblfsh.sh
- ./_tools/install-lookout-latest.sh
- (go run examples/language-analyzer.go |& tee ./go-analyzer.log)&
- sleep 5s
- ./lookout-sdk review --log-level=debug --from 0a9d1d159d2b0064c32df8d2287b174a91390b1a --to HEAD |& tee ./sdk.log
- grep -v -i "error" ./go-analyzer.log > /dev/null
- grep -v -i "error" ./sdk.log > /dev/null
- <<: *golangIntegrationTest
name: 'Golang 1.11: example integration tests'
go: '1.11'
- &golangTest
name: 'Golang 1.12 and Python 3.6: test'
stage: test
language: go
go: '1.12'
env:
- PYENV_VERSION="3.6.7"
script:
- make dependencies
- make test
- <<: *golangTest
name: 'Golang 1.11 and Python 3.6: test'
go: '1.11'
- &generatedCode
name: 'Golang 1.12: generated code'
stage: test
language: go
go: '1.12'
env:
- PYENV_VERSION="3.6.7"
script:
- make protogen
- make no-changes-in-commit
- <<: *generatedCode
name: 'Golang 1.11: generated code'
go: '1.11'
- name: 'Python: release a library'
stage: release
language: python
python: '3.6'
before_script:
- pip3 install twine
- cd python
script:
- python3 setup.py sdist bdist_wheel
- twine upload dist/*.tar.gz dist/*py3-none-any* -u $PYPI_LOGIN -p $PYPI_PASS
skip_cleanup: true
before_cache:
# make bblfsh images readable
- sudo chmod -R 777 $HOME/bblfshd/images
cache:
directories:
- protoc
- $HOME/.cache/pip/wheels
- $HOME/bblfshd/images