Skip to content

Commit efee288

Browse files
committed
Setting Travis Python version.
It's weird seeing Travis say a job is Python3.5 whilst the py27 tox env was running. Making both fields the same using bash magic.
1 parent 9c39b74 commit efee288

File tree

1 file changed

+13
-10
lines changed

1 file changed

+13
-10
lines changed

.travis.yml

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,24 @@
11
# Configure.
22
language: python
3-
python: 3.5
3+
matrix:
4+
include:
5+
- python: 3.5
6+
env: TOX_ENV=lint
7+
- python: 3.5
8+
env: TOX_ENV=docs
9+
python:
10+
- 3.5
11+
- 3.4
12+
- 3.3
13+
- 2.7
414
sudo: false
5-
env:
6-
- TOX_ENV=lint
7-
- TOX_ENV=py35
8-
- TOX_ENV=py34
9-
- TOX_ENV=py33
10-
- TOX_ENV=py27
11-
- TOX_ENV=docs
1215

1316
# Run.
1417
install: pip install coveralls tox
1518
before_script:
1619
- git config --global user.email "[email protected]"
1720
- git config --global user.name "Travis CI"
18-
script: tox -e $TOX_ENV
21+
script: tox -e ${TOX_ENV:-py${TRAVIS_PYTHON_VERSION//.}}
1922
after_success:
2023
- coveralls
2124
- eval "$(ssh-agent -s)"; touch docs/key; chmod 0600 docs/key
@@ -42,5 +45,5 @@ deploy:
4245
kzxiCBVD4dqGxMh318BmwXdurgWZbia2DJWs+QBNs44kiSByQmXWFXo2KamiBZAez+AdBPgA\
4346
Hs/smp3nE3TI9cHQzzbhDFZftI4dtLf8osNI="
4447
on:
45-
condition: $TOX_ENV = py35
48+
condition: $TRAVIS_PYTHON_VERSION = 3.4
4649
tags: true

0 commit comments

Comments
 (0)