Skip to content

Commit

Permalink
Merge pull request #812 from jakirkham/fix_ci_conda_4
Browse files Browse the repository at this point in the history
Fix Travis CI for Python 3.3 and conda 4.x
  • Loading branch information
groutr committed Mar 8, 2016
2 parents e827a77 + 7c2408f commit ef062a2
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
6 changes: 5 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@ install:
- export PATH="$HOME/miniconda/bin:$PATH"
- hash -r
- conda config --set always_yes yes
- conda install --force --no-deps conda requests
- if [[ "$TRAVIS_PYTHON_VERSION" == "3.3" ]]; then
conda install --force --no-deps 'conda=3.*' requests;
else
conda install --force --no-deps conda requests;
fi
- conda install pip pytest requests jinja2 patchelf pyflakes python=$TRAVIS_PYTHON_VERSION
- pip install pytest-cov
- python setup.py install
Expand Down
13 changes: 12 additions & 1 deletion tests/test-recipes/build_recipes.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,19 @@ echo "$OUTPUT" | grep "Error" | wc -l | grep 6
! OUTPUT=$(conda build --no-anaconda-upload conda-meta/ 2>&1)
echo "$OUTPUT" | grep 'Error: Untracked file(s) ('\''conda-meta/nope'\'',)'

# Get the version of conda as the error message changed in conda 4.
set +e
echo $(conda -V 2>&1) | grep "conda 3\..*"
export IS_CONDA_3=$?
set -e

! OUTPUT=$(conda build --no-anaconda-upload recursive-build/ 2>&1)
echo "$OUTPUT" | grep 'No packages found in current .* channels matching: recursive-build2 2\.0'
if [[ $IS_CONDA_3 -eq 0 ]]; then
echo "$OUTPUT" | grep 'No packages found in current .* channels matching: recursive-build2 2\.0'
else
echo "$OUTPUT" | tail -n2 | head -n1 | grep 'Error: Package missing in current .* channels: '
echo "$OUTPUT" | tail -n1 | grep ' - recursive-build2 2.0'
fi

! OUTPUT=$(conda build --no-anaconda-upload source_git_jinja2_oops/ 2>&1)
echo "$OUTPUT" | grep '\''GIT_DSECRIBE_TAG'\'' is undefined'
Expand Down

0 comments on commit ef062a2

Please sign in to comment.