Skip to content

Commit

Permalink
Adding a bit of a shonky script to skip build jobs if the combination…
Browse files Browse the repository at this point in the history
… of (python version, django version) is not officially supported
  • Loading branch information
carlio committed Sep 24, 2014
1 parent 3a7ada5 commit 55cb670
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 4 deletions.
9 changes: 7 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,17 @@ python:
- "2.7"
- "3.3"
- "3.4"
env:
- DJANGO='Django>=1.4,<1.5' SKIP='3.3 3.4'
- DJANGO='Django>=1.5,<1.6' SKIP='3.3 3.4'
- DJANGO='Django>=1.6,<1.7' SKIP='3.4'
- DJANGO='Django>=1.7,<1.8' SKIP='2.6'
install:
- "pip install --use-mirrors coverage coveralls"
- "pip install --use-mirrors -r test_requirements.txt"
- "pip install --use-mirrors $DJANGO"
- "pip install --use-mirrors git+https://github.com/landscapeio/pylint-plugin-utils.git@develop"
- "pip install --use-mirrors --editable ."
script:
coverage run test/test_func.py
scripts/travis-build.sh
after_success:
coveralls
2 changes: 2 additions & 0 deletions scripts/test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/bash
python test/test_func.py
17 changes: 17 additions & 0 deletions scripts/travis-build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash
PYSCR=$(cat <<EOF
import os, sys
for skip_ver in os.environ.get('SKIP', '').split():
skip_ver = tuple(map(int, skip_ver.split('.')))
if skip_ver == sys.version_info[:len(skip_ver)]:
sys.exit(1)
sys.exit(0)
EOF
)

python -c "$PYSCR"

if [ "$?" -eq "0" ]
then
coverage run test/test_func.py
fi
2 changes: 0 additions & 2 deletions test_requirements.txt

This file was deleted.

0 comments on commit 55cb670

Please sign in to comment.