-
Notifications
You must be signed in to change notification settings - Fork 10
/
.travis.yml
75 lines (67 loc) · 1.76 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
dist: xenial # required for Python >= 3.7.
language: python
matrix:
include:
- os: linux
python: 2.7
- os: linux
python: 2.7
env: MYPYTHON=jython - JYTHON_URL="https://search.maven.org/remotecontent?filepath=org/python/jython-installer/2.7.1/jython-installer-2.7.1.jar"
- os: linux
python: 3.5
- os: linux
python: 3.7
- os: linux
python: 3.8-dev
- os: osx
language: generic
env: PIP=pip3 MYPYTHON=python3
env:
global:
- MYPYTHON=python
- PIP=pip
cache:
directories:
- $HOME/.cache/pip
- $HOME/Library/Caches/pip
before_install:
- |
# Install jython or homebrew python on OSX
if [ "$MYPYTHON" == "jython" ]; then
deactivate
wget $JYTHON_URL -O jython_installer.jar;
java -jar jython_installer.jar -s -d $HOME/jython;
export PATH=$HOME/jython/bin:$PATH;
jython -c "print ''";
jython -c "import sys; print sys.version"
fi
install:
- |
# Install dependencies
$PIP install pip
if [ "$MYPYTHON" == "jython" ]; then
$PIP install pytest
fi
$PIP install wheel
$PIP install setuptools
$PIP install ply mako
$PIP install pycodestyle
if [ "$MYPYTHON" != "jython" ]; then
$PIP install --upgrade pytest pytest-cov codecov
fi
script:
- |
# Build parsetab and run tests
$MYPYTHON -c "from pyoracc import _generate_parsetab; _generate_parsetab()"
echo "Running tests"
if [ "$MYPYTHON" == "jython" ]; then
pytest
else
pytest --cov=pyoracc
fi
- pycodestyle --exclude=parsetab.py
after_success:
- |
if [ "$MYPYTHON" != "jython" ]; then
codecov
fi