forked from Ouranosinc/Magpie
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
84 lines (84 loc) · 3.01 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
83
84
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
- secure: lzPPXuRTlqLHl2MCAUuy7ROrewSwPFGGKqbADo7npQ4jqVMAb/TQ5PTzIi4IAIvsv817dNj5WSAd39hsp1zSlE1R2jLtbxGEVqwcjTqSv9VStGascRQnCW1hcoSKYqESweEhtdIcH+uXpV8qnDsUWB6YIIP2VjgWPMfSPZPynFKC0IqZm2sFsqDEJJHr3QM5iN3i3Z9GrEIrBEEpoaf0yak5u8LjqoGSaY8ISPGWipBJYn7i/r/+sZpirFXbZRJmI4ljsaHi0tysNWdANOIf7S2+Dy/oGNn/3Br0OMJ5snFe/n6Uf4GcmPGDc1c86oN0FpGcoNSA+lCUPMASghOGwVqBhMjX+qAZZfzEbCGtr2j/MhcpETMO3S9oqelw4CcbZRXxP2Y20L+KGNOCSt3SC4/HdKj5MWRQGUnIZbT9C2Tpn2wTffpVRoKvhik/6UU8/KT12LSwDhjjrfqLgCEFLqH1nBL2Mopkj/eOwQbZ66nZmthrAF7/c+vaB38LWoqBIZi/fOwo6+kt947d1bW6UX6Z1KnCNLN2KO064Hjn+SHb1gAes0JIXIZE7af1Gti2dKmUL4a5eoYyU5vCLlp2nq5yxEtTUdJKZ1UVnkDqRtSaT0F3FgLypbFqi+qZ6AtygxKqplMjeAGhvVSqZTPqRupP1ac/KBBCvMzG8pkfXWs=
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
- |
if [ "${TRAVIS_PYTHON_VERSION}" -eq "3.6" ]; then
make lint
make coverage
fi
notifications:
email: false
after_success:
- bash <(curl -s https://codecov.io/bash) || echo "Codecov did not collect coverage reports"
- source ${CONDA_PREFIX}/bin/activate ${CONDA_ENV} && python-codacy-coverage -r coverage.xml