-
Notifications
You must be signed in to change notification settings - Fork 36
/
Copy path.travis.yml
22 lines (21 loc) · 972 Bytes
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
language: python
python:
- '3.6'
- '3.7'
- '3.8'
- '3.9'
before_install:
- PYTHON_MAJOR_VERSION=`echo $TRAVIS_PYTHON_VERSION | head -c 1`
- if [[ $PYTHON_MAJOR_VERSION == 3 ]]; then sudo apt-get install python3-pip; fi
install:
- if [[ $PYTHON_MAJOR_VERSION == 2 ]]; then virtualenv venv; fi
- if [[ $PYTHON_MAJOR_VERSION == 3 ]]; then virtualenv -p python3 venv; fi
- source venv/bin/activate
- cd python
- if [[ $PYTHON_MAJOR_VERSION == 2 ]]; then pip install oldest-supported-numpy -r requirements.txt -r requirements_dev.txt; fi
- if [[ $PYTHON_MAJOR_VERSION == 3 ]]; then pip3 install oldest-supported-numpy -r requirements.txt -r requirements_dev.txt; fi
- if [[ $PYTHON_MAJOR_VERSION == 2 ]]; then pip install -e .; fi
- if [[ $PYTHON_MAJOR_VERSION == 3 ]]; then pip3 install -e .; fi
script:
- if [[ $PYTHON_MAJOR_VERSION == 2 ]]; then py.test -v -x automated_test.py; fi
- if [[ $PYTHON_MAJOR_VERSION == 3 ]]; then python3 -m pytest -v -x automated_test.py; fi