-
Notifications
You must be signed in to change notification settings - Fork 9
/
.travis.yml
65 lines (65 loc) · 1.65 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
language: python
sudo: true
dist: bionic
services:
- docker
cache: pip
before_cache:
- chown -R travis:travis $HOME/.cache/pip
stages:
- style
- test
- name: deploy
# require any tag name
if: tag =~ .*
_install: &_install
- sudo apt update -y
- sudo apt install -y libsnappy-dev
- travis_retry make bblfsh-start
- pip install --upgrade pip cython codecov
- ML_MINING_SETUP_INCLUDE_TESTS=1 pip install .[tf]
- cd $(pip show sourced.ml.mining|grep Location|cut -d' ' -f2)/sourced/ml/mining
- find . -wholename "*/tests/*" -type d -exec chmod 555 {} \;
_coverage: &_coverage
- coverage run --concurrency=multiprocessing -m unittest discover
- travis_retry coverage combine
matrix:
fast_finish: true
include:
- stage: style
name: 'Check code style'
python: 3.7
script:
- make check
install:
- pip install -r requirements-lint.txt
- stage: test
name: 'Test Python 3.6'
python: 3.6
script: *_coverage
install: *_install
- stage: test
name: 'Test Python 3.7'
python: 3.7
script: *_coverage
install: *_install
after_success:
- codecov
- stage: deploy
name: 'Upload package to Pypi'
python: 3.6
install:
- pip3 install --upgrade pip
- pip3 install twine pyopenssl
before_script: skip
script:
- test $(python3 setup.py --version) == $TRAVIS_TAG
- python3 setup.py bdist_wheel
deploy:
provider: script
script: twine upload dist/*py3-none-any* -u $PYPI_LOGIN -p $PYPI_PASS
skip_cleanup: true
on:
tags: true
notifications:
email: false