/
.travis.yml
39 lines (39 loc) · 1.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
language: python
dist: xenial
cache:
pip: true
directories:
- /usr/local/bin
- /usr/local/lib/python$TRAVIS_PYTHON_VERSION/site-packages
python:
- '3.5'
- '3.6'
- '3.7'
- 'nightly'
install:
- pip install pipenv
- pipenv install --dev --system
before_script:
- python3 setup.py install
- python3 setup.py test
- ./build-swig-wrapper.sh
script:
- flake8 --verbose apertium
- if [[ $TRAVIS_PYTHON_VERSION != 3.4 ]]; then
mypy apertium --strict --any-exprs-report .mypy_coverage --ignore-missing-imports;
cat .mypy_coverage/any-exprs.txt;
coverage=$(tail -1 .mypy_coverage/any-exprs.txt | grep -Eo '[0-9\.]+%' | sed 's/%$//');
if (( $(echo "$coverage < 90" | bc -l) )); then
exit 1;
fi;
fi
- coverage run -m unittest --verbose --buffer tests
- coverage report --show-missing --fail-under 85 --include 'apertium/**' --omit 'apertium/installer.py'
after_success:
- coveralls
notifications:
on_failure: change
on_success: change
matrix:
allow_failures:
- python: nightly