-
Notifications
You must be signed in to change notification settings - Fork 16
/
.travis.yml
75 lines (75 loc) · 1.92 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
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
- travis_retry make bblfsh-start
- pip install --upgrade pip cython codecov
- ML_CORE_SETUP_INCLUDE_TESTS=1 pip install .[tf]
- cd $(pip show sourced.ml.core|grep Location|cut -d' ' -f2)/sourced/ml/core
- 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: test
name: "Tests inside docker"
script:
- make docker-build VERSION=test
- make docker-test VERSION=test
install:
- travis_retry make bblfsh-start
- 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
- name: "Push image to Docker Hub"
python: 3.6
stage: deploy
script:
- DOCKER_PUSH_LATEST=true make docker-push
notifications:
email: false