forked from glideinWMS/glideinwms
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
51 lines (45 loc) · 1.78 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
language: python
python:
- "3.6"
# Travis will create a virtualenv by default. The base system is Ubuntu
# Just some useful info and prep work
before_install:
- uname -a
# Installing for m2crypto
- sudo apt-get install -qq -y swig python-dev openssl libssl-dev python-m2crypto
- pip install -U pip
- pip install -U pytest
# setup the 'simple major ver' link, missing for some versions on travis-ci....
- if [[ ! -e /opt/python/${TRAVIS_PYTHON_VERSION} ]]; then
sudo ln -s /opt/python/$(python -c 'import sys;print("%d.%d.%d" % sys.version_info[:3])') /opt/python/${TRAVIS_PYTHON_VERSION};
fi
# command to install dependencies
install:
# see decisionengine_modules if classads need to be extracted from apt package
# We should already be here - cd ${TRAVIS_BUILD_DIR}
#
- pip install -r requirements.txt
- pip install coveralls
# Environment variables
env:
- global:
- GLIDEINWMS_SRC="${TRAVIS_BUILD_DIR}"
- SOURCES="${GLIDEINWMS_SRC},${GLIDEINWMS_SRC}/factory/,${GLIDEINWMS_SRC}/factory/tools,${GLIDEINWMS_SRC}/frontend,${GLIDEINWMS_SRC}/frontend/tools,${GLIDEINWMS_SRC}/install,${GLIDEINWMS_SRC}/lib,${GLIDEINWMS_SRC}/tools,${GLIDEINWMS_SRC}/tools/lib"
- PYTHONPATH="${GLIDEINWMS_SRC}/doc/api:${GLIDEINWMS_SRC}"
# command to run tests
script:
# - pytest
- cd ${GLIDEINWMS_SRC}/unittests
- echo "PPATH ${PYTHONPATH}"
- echo "Folders in ${GLIDEINWMS_SRC}/doc/api/glideinwms are $(ls -l ${GLIDEINWMS_SRC}/doc/api/glideinwms)"
- coverage erase
- for TST in $(ls test*.py); do
echo '========>' "$TST";
coverage run --source="${SOURCES}" --omit="test_*.py" -a "$TST";
done
- coverage report
# - cd `dirname ${TRAVIS_BUILD_DIR}`
# - coverage run -m pytest -v -l --tb=native glideinwms
# hook into coveralls
#after_success:
# - coveralls