-
Notifications
You must be signed in to change notification settings - Fork 5
/
.travis.yml
82 lines (82 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
79
80
81
82
language: python
python:
- "2.7"
- "3.5"
- "3.6"
sudo: false
cache:
- pip
- directories:
- $HOME/conda
- $HOME/downloads
# includes PR when base branch = master
if: branch = master OR tag IS present
env:
global:
- CONDA_HOME=$HOME/conda
- DOWNLOAD_CACHE=$HOME/downloads
matrix:
- TEST_TARGET=test-local START_TARGET=
- TEST_TARGET=test-remote START_TARGET=start
- TEST_TARGET=coverage START_TARGET=
addons:
postgresql: "9.6"
postgres:
adapter: postgresql
database: magpie
username: postgres
password: qwerty
before_install:
- python -V
- uname -a
- lsb_release -a
- export PYTHON_VERSION=${TRAVIS_PYTHON_VERSION}
- export CONDA_ENV=magpie-${TRAVIS_PYTHON_VERSION}
- export CONDA_PREFIX=$HOME/conda/envs/magpie-${TRAVIS_PYTHON_VERSION}
- export PATH=${CONDA_HOME}/bin:$PATH
- hash -r
- env
- make conda-base
- make install-sys
- echo $CONDA_PREFIX
- echo $CONDA_ENV
#==== magpie env and constants ===
- mkdir -p ./env
- cp -f ./ci/magpie.env ./env/magpie.env
install:
# TODO: remove when fixed and merged (see requirements.txt and Makefile)
- |
if [ "${TRAVIS_PYTHON_VERSION}" -eq "2.7" ]; then
${CONDA_PREFIX}/bin/pip install --upgrade --force-reinstall python-openid && \
${CONDA_PREFIX}/bin/pip uninstall -y python3-openid;
else
${CONDA_PREFIX}/bin/pip install --upgrade --force-reinstall python3-openid && \
${CONDA_PREFIX}/bin/pip uninstall -y python-openid;
fi
- make install install-dev
- make version
- ${CONDA_PREFIX}/bin/pip freeze
before_script:
- psql -c 'create database magpie;' -U postgres
- echo $CONDA_PREFIX
- echo $CONDA_ENV
- export PYTHON_VERSION=${TRAVIS_PYTHON_VERSION}
- export CONDA_ENV=magpie-${TRAVIS_PYTHON_VERSION}
- export CONDA_PREFIX=$HOME/conda/envs/magpie-${TRAVIS_PYTHON_VERSION}
- export PATH=${CONDA_HOME}/bin:$PATH
- hash -r
- env
- echo $CONDA_PREFIX
- echo $CONDA_ENV
script:
- export MAGPIE_LOG_LEVEL=INFO
- make $START_TARGET $TEST_TARGET
# run static code checks only once
- |
if [ "${TRAVIS_PYTHON_VERSION}" -eq "3.6" ]; then
make lint
fi
notifications:
email: false
after_success:
- bash <(curl -s https://codecov.io/bash) || echo "Codecov did not collect coverage reports"