Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor travis install logic to move it into a shell script #1763

Merged
merged 1 commit into from
Apr 26, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 1 addition & 13 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,7 @@ env:
before_install:
- "[ -d ~/.distlib ] && sudo chown -R travis:travis ~/.distlib || true"

install:
- "if [[ $TOXENV == 'pypy' ]]; then sudo add-apt-repository -y ppa:pypy/ppa; fi"
- "if [[ $TOXENV == 'pypy' ]]; then sudo apt-get -y update && sudo apt-get -y install pypy; fi"
# This is required because we need to get rid of the Travis installed PyPy
# or it'll take precedence over the PPA installed one.
- "if [[ $TOXENV == 'pypy' ]]; then sudo rm -rf /usr/local/pypy/bin; fi"
- "if [[ $TOXENV == 'py34' ]]; then .travis/py34.sh; fi"
- sudo apt-get install subversion bzr mercurial
- echo -e "[web]\ncacerts = /etc/ssl/certs/ca-certificates.crt" >> ~/.hgrc
- git config --global user.email "python-virtualenv@googlegroups.com"
- git config --global user.name "Pip"
- pip install --upgrade setuptools
- pip install tox
install: .travis/install.sh

script: .travis/run.sh

Expand Down
23 changes: 23 additions & 0 deletions .travis/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash

set -e
set -x

case $TOXENV in
py34)
sudo add-apt-repository -y ppa:fkrull/deadsnakes
sudo apt-get update
sudo apt-get install python3.4
;;
pypy)
sudo add-apt-repository -y ppa:pypy/ppa
sudo apt-get -y update
sudo apt-get -y install pypy
;;
esac

git config --global user.email "python-virtualenv@googlegroups.com"
git config --global user.name "Pip"

pip install --upgrade setuptools
pip install tox