cdli-gh/pyoracc

View on GitHub
.travis.yml

Summary

Maintainability
Test Coverage
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