-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.travis.yml
49 lines (48 loc) · 2.84 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
language: python # this works for Linux but is an error on macOS or Windows
matrix:
include:
- name: "Python 3.7 on Xenial Linux"
python: 3.7 # this works for Linux but is ignored on macOS or Windows
dist: xenial # required for Python >= 3.7
script:
- test_data_dir=/tests/test_data/
- echo \{\"u1\":\"${USERNAME1}\",\"p1\":\"${PASSWORD1}\"\} > $(pwd)${test_data_dir}secrets1.json
- echo \{\"u1\":\"${USERNAME1}\",\"p1\":\"${PASSWORD1}\",\"u2\":\"${USERNAME2}\",\"p2\":\"${PASSWORD2}\"\} > $(pwd)${test_data_dir}secrets2.json
- cat $(pwd)${test_data_dir}secrets1.json
- if [ ${TRAVIS_EVENT_TYPE} == "cron" ]; then tox -e e2e; else tox -e unit; fi
- codecov
- sleep 10 # Github build status would not be updated by "codecov" otherwise
- name: "Python 3.7 on macOS"
os: osx
osx_image: xcode10.2 # Python 3.7.2 running on macOS 10.14.3
language: shell # 'language: python' is an error on Travis CI macOS
before_install: python3 --version ; pip3 --version ; sw_vers
script:
- test_data_dir=/tests/test_data/
- echo \{\"u1\":\"${USERNAME1}\",\"p1\":\"${PASSWORD1}\"\} > $(pwd)${test_data_dir}secrets1.json
- echo \{\"u1\":\"${USERNAME1}\",\"p1\":\"${PASSWORD1}\",\"u2\":\"${USERNAME2}\",\"p2\":\"${PASSWORD2}\"\} > $(pwd)${test_data_dir}secrets2.json
- cat $(pwd)${test_data_dir}secrets1.json
- pip3 install -e .[dev]
- if [ ${TRAVIS_EVENT_TYPE} == "cron" ]; then pytest -sv --cov=copinicoos; else pytest -sv -m "not e2e" --cov=copinicoos; fi
- codecov
- sleep 10 # Github build status would not be updated by "codecov" otherwise
- name: "Python 3.7 on Windows"
os: windows # Windows 10.0.17134 N/A Build 17134
language: shell # 'language: python' is an error on Travis CI Windows
before_install:
- choco install wget
- choco install python # this install takes at least 1 min 30 sec
- python -m pip install --upgrade pip
env: PATH=/c/Python37:/c/Python37/Scripts:$PATH
script:
- test_data_dir=/tests/test_data/
- echo \{\"u1\":\"${USERNAME1}\",\"p1\":\"${PASSWORD1}\"\} > $(pwd)${test_data_dir}secrets1.json
- echo \{\"u1\":\"${USERNAME1}\",\"p1\":\"${PASSWORD1}\",\"u2\":\"${USERNAME2}\",\"p2\":\"${PASSWORD2}\"\} > $(pwd)${test_data_dir}secrets2.json
- cat $(pwd)${test_data_dir}secrets1.json
- pip install -e .[dev]
- if [ ${TRAVIS_EVENT_TYPE} == "cron" ]; then pytest -sv --cov=copinicoos; else pytest -sv -m "not e2e" --cov=copinicoos; fi
- codecov
- sleep 10 # Github build status would not be updated by "codecov" otherwise
install:
- pip3 install --upgrade pip # all three OSes agree about 'pip3'
- pip install tox-travis codecov