-
-
Notifications
You must be signed in to change notification settings - Fork 26
/
.travis.yml
54 lines (47 loc) · 1.48 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
language: python
# Explicitly specifying default OS for clarity
os: linux
matrix:
include:
- python: 2.7
- python: 3.7
- python: 3.8
- python: pypy2.7-6.0
- python: pypy3.5-6.0
# Python is not natively supported in windows yet, have to install it through shell script
# https://github.com/WeblateOrg/translation-finder/blob/master/.travis.yml#L20-L33
- os: windows
language: sh
python: 2.7
env:
- PY_VERSION_BASE=2 PY_VERSION=2.7.15 PY_VERSION_PATH=27
- os: windows
language: sh
python: 3.7
env:
- PY_VERSION_BASE=3 PY_VERSION=3.7.2 PY_VERSION_PATH=37
- os: windows
language: sh
python: 3.8
env:
- PY_VERSION_BASE=3 PY_VERSION=3.8.1 PY_VERSION_PATH=38
before_install:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
sudo chmod 0777 /var/run;
fi
install:
# Install python on windows machine, environment variables should be set in the matrix above
- if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then
choco install python${PY_VERSION_BASE} --version ${PY_VERSION};
export PATH="/c/Python${PY_VERSION_PATH}:/c/Python${PY_VERSION_PATH}/Scripts:$PATH";
python -m pip install --upgrade pip wheel;
fi
- pip install -U flake8 pytest pytest-cov
- dpkg --compare-versions $TRAVIS_PYTHON_VERSION ge 3.3 || pip install "mock>=2.0.0"
- pip install -e .
script:
- echo $TRAVIS_PYTHON_VERSION
- flake8 --show-source --ignore=E501,W391 .
- PYTHONPATH=. pytest -v -x --cov=pid
after_success:
- coveralls