-
Notifications
You must be signed in to change notification settings - Fork 44
/
.travis.yml
83 lines (76 loc) · 3.28 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
language: python
env:
global:
- PACKAGE="NeoVintageous"
- NO_AT_BRIDGE=1
matrix:
- SUBLIME_TEXT_VERSION="3"
matrix:
include:
- os: linux
dist: trusty
python: 3.3
- os: linux
services: xvfb
python: 3.8
- os: osx
language: generic
before_install:
- curl -OL https://raw.githubusercontent.com/SublimeText/UnitTesting/master/sbin/travis.sh
# Enable GUI. See https://docs.travis-ci.com/user/gui-and-headless-browsers.
- if [ "$TRAVIS_PYTHON_VERSION" == "3.3" ]; then
export DISPLAY=:99.0;
sh -e /etc/init.d/xvfb start;
fi
install:
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then
if [ "$TRAVIS_PYTHON_VERSION" == "3.3" ]; then
pip install flake8==3.5;
pip install flake8-docstrings;
pip install pydocstyle==3.0.0;
pip install coverage==4.5.4;
pip install codecov==2.0.15;
pip install python-coveralls;
pip install typing==3.7.4.1;
pip install mypy==0.540;
flake8 --version;
mypy --version;
else
pip install flake8;
pip install flake8-docstrings;
pip install pydocstyle;
pip install coverage==4.5.4;
pip install codecov;
pip install python-coveralls;
pip install mypy;
flake8 --version;
mypy --version;
fi
fi
- sh travis.sh bootstrap
script:
- sh travis.sh run_tests --coverage
- sh travis.sh run_syntax_compatibility
- sh travis.sh run_syntax_tests
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then
flake8;
fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then
wget -v https://github.com/gerardroche/sublime-mypy-stubs/archive/master.zip && unzip master.zip;
export MYPYPATH="$PWD/sublime-mypy-stubs-master";
cd "$HOME/.config/sublime-text-3/Packages/$PACKAGE/";
find . -type d ! -path "*/\.*" ! -path "./tmp*" ! -path "./htmlcov*" ! -path "./bin*" ! -path "./res*" ! -path "./tests/fixtures*" ! -exec test -f "{}/__init__.pyi" ";" ! -exec test -f "{}/__init__.py" ";" -exec touch "{}/__init__.pyi" ";" -print;
find . -type f -name __init__.py -print && find . -type f -name __init__.pyi -print;
if [ "$TRAVIS_PYTHON_VERSION" == "3.3" ]; then
sed -i "/^\(disallow_any_decorated\|disallow_any_explicit\|disallow_any_expr\|disallow_any_generics\|disallow_any_unimported\|no_implicit_reexport\|no_strict_optional\|no_warn_no_return\|strict_equality\|warn_unreachable\)/d" "../$PACKAGE/mypy.ini";
mypy "../$PACKAGE" | sed "/No library stub file for standard library module .ctypes./d;/Stub files are from/d;/The return type of .__init__. must be None/d;/Module has no attribute .STARTUPINFO./d;/Module has no attribute .STARTF_USESHOWWINDOW./d;/unused .type. ignore. comment/d;/^$/d" | grep -v "^$" && return 1 || return 0;
else
mypy --show-error-codes "../$PACKAGE";
fi;
fi
- cd "$TRAVIS_BUILD_DIR";
after_success:
- coveralls
- codecov
notifications:
email: false