forked from glue-viz/glue
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
78 lines (58 loc) · 2.26 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
language: python
sudo: false
addons:
apt:
packages:
- ruby
- enchant
notifications:
email: false
env:
global:
- NO_CFG_FILES=false
- SETUP_XVFB=True
matrix:
include:
# Test without any Qt installation, which will also cause all qt
# sub-directories to be removed, to make sure that no non-Qt code has
# any dependence on Qt code.
- os: linux
python: 3.7
env: QT_PKG=False
before_install:
# now set up a plugin configuration file with some plugins disabled. This is
# to make sure that when we run the tests, glue will ignore this
# configuration and will instead run tests for all plugins.
- if [[ $NO_CFG_FILES == false ]]; then mkdir ~/.glue; printf "[plugins]\nspectrum_tool = 0\n" >> ~/.glue/plugins.cfg; fi
install:
- LC_ALL=C
# Install glue and dependencies (but without Qt)
- pip install .[all] --upgrade
# Uninstall any version of Qt if QT_PKG is False, and remove all qt
# sub-directories
- if [[ $QT_PKG == False ]]; then
sed -i.bak '/qtpy/d' setup.py;
sed -i.bak '/sys.exit(1)/d' setup.py;
pip uninstall PyQt5 || true;
pip uninstall PyQtWebEngine || true;
pip uninstall PySide2 || true;
find . -name "qt" -type d -exec rm -r {} \; || true;
rm glue/external/qt.py || true;
sed -i.bak 's/in REQUIRED_PLUGINS/in REQUIRED_PLUGINS and False/' glue/main.py || true;
fi
# Set MPLBACKEND to Agg by default - this will get overriden if Qt is present,
# but it avoids having Matplotlib default to the osx backend on MacOS X
- export MPLBACKEND='Agg';
# List installed packages
- pip freeze
# Check that all the plugins load correctly
- python -c 'from glue.logger import logger; logger.setLevel("DEBUG"); from glue.main import load_plugins; load_plugins()'
script:
# In the following, we make sure there are no font sizes hard-coded in *.ui files.
# We do this because the default application font size may change on different
# platforms, but the sizes in ui files are absolute, which can lead to mismatched
# font sizes.
- find glue -name "*.ui" -exec grep "pointsize" {} \; >& font.log
- test ! -s font.log
- if [[ $QT_PKG == False ]]; then glue --version; fi
- pytest --durations=20 -vs $PYTEST_ARGS glue