-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
46 lines (39 loc) · 1.51 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
language: python
sudo: false
install: # now just our code
# conda
- |
deps="`grep -v \# requirements/miniconda.conda`"
conda create -q -n test-environment python=$TRAVIS_PYTHON_VERSION $deps
- source activate test-environment
- pip install -r requirements/development.pip
# ODM2
# - pip install odm2api
- pip install --process-dependency-links git+https://github.com/ODM2/ODM2PythonAPI.git
# - pip install -r requirements_tests.txt --allow-external pyodbc --allow-unverified pyodbc
- pip install pysqlite
- pip list
before_install:
- wget http://bit.ly/miniconda -O miniconda.sh
- bash miniconda.sh -b -p $HOME/miniconda
- export PATH="$HOME/miniconda/bin:$PATH"
- conda config --set always_yes yes --set changeps1 no --set show_channel_urls true
- conda update conda
- conda config --add channels conda-forge --force
- conda create --name TEST python=$TRAVIS_PYTHON_VERSION --file requirements.txt --file requirements-dev.txt
- source activate TEST
- if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then
conda install mock ;
fi
# FIXME: Test source distribution.
install:
- python setup.py sdist && version=$(python setup.py --version) && pushd dist && pip install YODA-Tools-${version}.tar.gz && popd
script:
- if [[ $TEST_TARGET == 'default' ]]; then
cp -r tests /tmp ;
cd /tmp && py.test -s -rxs -v tests ;
fi
- if [[ $TEST_TARGET == 'coding_standards' ]]; then
flake8 --max-line-length=105 yodatools ;
flake8 --max-line-length=105 tests ;
fi