Enable testing in Travis CI

This commit is contained in:
Paweł Świątkowski 2018-10-30 17:36:25 +01:00
parent 847fb98410
commit b50d627333
4 changed files with 13 additions and 11 deletions

View file

@ -1,12 +1,15 @@
language: cpp
language: generic
os:
- osx
- linux
osx_image: xcode7.3
sudo: required
install:
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then bash package/prepare_osx.sh; fi
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then bash package/prepare_linux.sh; fi
script:
- python3 package/dependency_test.py
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then python3 -m pytest -vs; fi
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then xvfb-run -s '-screen 0 640x480x24 +extension GLX' pytest -vs; fi
before_deploy:
- export FILENAME=manuskript-$TRAVIS_BRANCH-$TRAVIS_OS_NAME.zip
- pyinstaller manuskript.spec --clean

View file

@ -1,8 +0,0 @@
import os
import sys
realpath = os.path.realpath(__file__)
sys.path.insert(1, os.path.join(os.path.dirname(realpath), '..'))
from manuskript import main

7
package/prepare_linux.sh Normal file
View file

@ -0,0 +1,7 @@
sudo apt-get -qq update
sudo apt-get -qq install python3-pip python3-dev build-essential qt5-default libxml2-dev libxslt1-dev mesa-utils libgl1-mesa-glx libgl1-mesa-dev
pyenv local 3.6.3
python --version
easy_install pip
pip install pyqt5==5.9 lxml pytest pytest-faulthandler

View file

@ -6,7 +6,7 @@ brew upgrade python
brew install enchant
brew postinstall python # this installs pip
sudo -H pip3 install --upgrade pip setuptools wheel
pip3 install pyinstaller PyQt5 lxml pyenchant
pip3 install pyinstaller PyQt5 lxml pyenchant pytest pytest-faulthandler
brew install qt hunspell
# fooling PyEnchant as described in the wiki: https://github.com/olivierkes/manuskript/wiki/Package-manuskript-for-OS-X
sudo touch /usr/local/share/aspell