All Projects → praekeltfoundation → travis-pyenv

praekeltfoundation / travis-pyenv

Licence: MIT License
Set up pyenv to use in Travis CI

Programming Languages

shell
77523 projects

Projects that are alternatives of or similar to travis-pyenv

LocalSupport
A directory of local support services and volunteer opportunities
Stars: ✭ 60 (+252.94%)
Mutual labels:  travis-ci
todo-list
TodoList using Ionic2/3 & Firebase: * PWA * SSO Google plus. * Share list via QRcode. * Upload image from Camera or Storage. * Speech Recognition.
Stars: ✭ 18 (+5.88%)
Mutual labels:  travis-ci
travis-oracle
Scripts to install Oracle Database Express Edition on Travis CI
Stars: ✭ 44 (+158.82%)
Mutual labels:  travis-ci
projection-pursuit
An implementation of multivariate projection pursuit regression and univariate classification
Stars: ✭ 24 (+41.18%)
Mutual labels:  travis-ci
travis-minikube
Run minikube on Travis CI
Stars: ✭ 89 (+423.53%)
Mutual labels:  travis-ci
drupal9ci
One-line installers for implementing Continuous Integration in Drupal 9
Stars: ✭ 137 (+705.88%)
Mutual labels:  travis-ci
react-multi-context
Manage multiple React 16 contexts with a single component.
Stars: ✭ 19 (+11.76%)
Mutual labels:  travis-ci
microservice-bootstrap
Get started with Microservices using dotnet core
Stars: ✭ 18 (+5.88%)
Mutual labels:  travis-ci
DockerDjangoRest
A Docker setup for a Django REST API with Travis CI support
Stars: ✭ 46 (+170.59%)
Mutual labels:  travis-ci
ubuntu-win-bootstrap
DEPRECIATED! Use "linux-comfy-chair" instead. A very simple bootstrap script to install some development tools to the Windows 10 Ubuntu Bash system - Ruby, Perl, Python, Node, Sublime Text and more!
Stars: ✭ 27 (+58.82%)
Mutual labels:  pyenv
xiaomi-r3g-openwrt-builder
OpenWrt builder for any supported routers using Docker. Scheduled to run weekly
Stars: ✭ 25 (+47.06%)
Mutual labels:  travis-ci
unity-ci-test
Example Unity Project using TravisCI
Stars: ✭ 35 (+105.88%)
Mutual labels:  travis-ci
containerized-golang-and-vuejs
This repository explores an application using docker, golang, and vuejs
Stars: ✭ 19 (+11.76%)
Mutual labels:  travis-ci
webperf-dashboard
Web Performance Dashboard forked from https://github.com/boyney123/garie
Stars: ✭ 51 (+200%)
Mutual labels:  travis-ci
personal-blog
✍️ 个人技术博客
Stars: ✭ 79 (+364.71%)
Mutual labels:  travis-ci
knapsack pro-ruby
Knapsack Pro gem splits tests across parallel CI nodes and makes sure that tests will run in optimal time on each node.
Stars: ✭ 101 (+494.12%)
Mutual labels:  travis-ci
react-innertext
Returns the innerText of a React JSX object.
Stars: ✭ 37 (+117.65%)
Mutual labels:  travis-ci
travis elixir plts
Pre-built Dialyzer Persistent Lookup Tables for Travis and Elixir
Stars: ✭ 16 (-5.88%)
Mutual labels:  travis-ci
travis-wait-enhanced
Prevent Travis CI from thinking a long-running process has stalled
Stars: ✭ 16 (-5.88%)
Mutual labels:  travis-ci
travis-activate
Activates Travis-CI builds for all repos in a given GitHub project
Stars: ✭ 20 (+17.65%)
Mutual labels:  travis-ci

travis-pyenv

This project is no longer used by Praekelt.org and won't be maintained. It will remain here if you'd still like to use it. Feel free to adopt it if you want to make some changes.

GitHub release Build status

Set up pyenv to use in Travis CI builds.

Setting up pyenv properly in a Travis CI build environment can be quite tricky. This repo contains a script (setup-pyenv.sh) that makes this process much simpler.

Use cases for this include:

  • Install an up-to-date version of PyPy. The Travis CI build images currently contain a very old version of PyPy which breaks some common Python modules.
  • Install an exact version of CPython or some other lesser-known distribution that Travis CI doesn't support.
  • Install Python on macOS builds.

Usage

  1. Set the $PYENV_VERSION environment variable to the Python to install.
  2. Tell Travis to cache the $HOME/.pyenv_cache directory.
  3. Download and source the setup-pyenv.sh script in before_install.
  4. Build your project and run your tests as usual.

There are a few install options that can be set via environment variables:

  • PYENV_VERSION The pyenv to install [required]
  • PYENV_VERSION_STRING String to grep -F against the output of python --version to validate that the correct Python was installed (recommended) [default: none]
  • PYENV_ROOT Directory in which to install pyenv [default: ~/.travis-pyenv]
  • PYENV_RELEASE Release tag of pyenv to download [default: clone from master]
  • PYENV_CACHE_PATH Directory in which to cache pyenv's Python builds [default: ~/.pyenv_cache]
  • VIRTUALENV_EXTRA_ARGS Extra arguments to be used when creating the virtualenv

Example travis.yml

language: python
dist: trusty
matrix:
  include:
    - env: PYENV_VERSION='2.7.13' PYENV_VERSION_STRING='Python 2.7.13'
    - python: '3.5'
    - env: PYENV_VERSION=pypy2.7-5.8.0 PYENV_VERSION_STRING='PyPy 5.8.0'
    - env: PYENV_VERSION=pypy3.5-5.8.0 PYENV_VERSION_STRING='PyPy 5.8.0-beta0'
cache:
  - pip
  - directories:
    - $HOME/.pyenv_cache

before_install:
  - |
      if [[ -n "$PYENV_VERSION" ]]; then
        wget https://github.com/praekeltfoundation/travis-pyenv/releases/download/0.4.0/setup-pyenv.sh
        source setup-pyenv.sh
      fi

script:
  - py.test my_project

Notes

  • Some recent PyPy versions and all recent "Portable PyPy" versions require Travis' Trusty CI build environment. See pyenv/pyenv#925.
  • Installing pyenv by downloading a release tag rather than cloning the git repo can make your builds a bit faster in some cases. Set the PYENV_RELEASE environment variable to achieve that.
  • If you want to use $PYENV_CACHE_PATH, you must also set up Travis to cache this directory in your Travis configuration. Using the cache is optional, but it can greatly speed up subsequent builds.
  • The $PYENV_ROOT defaults to ~/.travis-pyenv, rather than the usual ~/.pyenv. This is because some of Travis' Trusty build environments already have a pyenv install in this location.
  • pyenv fails to install properly if the $PYENV_ROOT is already present, even if the directory is empty. So if you set Travis to cache any directories within the pyenv root, then you will probably break pyenv. For this reason, Python builds are cached outside the pyenv root and then linked after pyenv is installed.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].