treeherder/.travis.yml

60 строки
2.3 KiB
YAML
Исходник Обычный вид История

Bug 1205316 - Travis: Use the beta Trusty infra & update to mysql 5.6 Stage/production/Vagrant/Heroku's RDS all use mysql 5.6, however Travis is currently running v5.5. Installing mysql 5.6 manually on the Travis container infra is currently broken: https://github.com/travis-ci/apt-package-whitelist/issues/1206#issuecomment-149884653 To use sudo (for apt-get) we either have to fall back to the legacy non-container infra, or else use the new Trusty beta infra: http://blog.travis-ci.com/2015-10-14-opening-up-ubuntu-trusty-beta/ http://docs.travis-ci.com/user/trusty-ci-environment/#Runtimes The Trusty beta infra is also non-container, but at least isn't EOL. Unfortunately similar to the legacy non-container infra, it doesn't offer caching, so incurs a setup time penalty of approx 3 minutes (including the mysql 5.6 install, npm install and peep install). See: https://github.com/travis-ci/travis-ci/issues/4997 If/when the container infra uses mysql 5.6 by default, or the bug preventing installing it using the apt travis.yml option is fixed, we should switch back to the container infra, to speed up the Travis run. In this commit, we use `--user` with the peep install, since the non-container infra doesn't set up a virtualenv, and we cannot use sudo due to: https://github.com/travis-ci/travis-ci/issues/4989 In addition, the current user ("travis") now doesn't have permissions to create the Treeherder DB, so we have to use `-u root` (the password is blank). The new infra is running Python 2.7.10 (rather than the v2.7.9 of the container infra) which now matches what runs in the Vagrant environment. In future bugs we should update stage/prod and Heroku to 2.7.10 too.
2015-10-21 20:23:32 +03:00
# This doesn't do anything on the non-container infra. See:
# https://github.com/travis-ci/travis-ci/issues/4997
# cache:
# directories:
# - $HOME/virtualenv/python2.7.9
# - node_modules
2013-06-25 18:00:48 +04:00
env:
2013-06-25 21:05:18 +04:00
global:
- DATABASE_URL='mysql://root@localhost/test_treeherder'
- DATABASE_URL_RO='mysql://root@localhost/test_treeherder'
- TREEHERDER_DJANGO_SECRET_KEY='secretkey-1234'
matrix:
include:
# Each entry here creates another sub-job.
- env: main-test-run
# Once mysql 5.6 is available on the container infra, this can be removed.
sudo: required
dist: trusty
python: "2.7"
services:
- rabbitmq
- memcached
before_install:
# Manually install mysql 5.6 since the default is v5.5.
- sudo apt-get update -qq
- sudo apt-get install -qq mysql-server-5.6 mysql-client-5.6 mysql-client-core-5.6
install:
- npm install
# We use `--user` with pip install since the non-container infra doesn't set up
# a virtualenv, and we cannot use sudo due to:
# https://github.com/travis-ci/travis-ci/issues/4989
# Disabling the pip version check speeds up the install considerably, since peep
# calls pip once per package, which results in duplicate checks (plus log spam).
- ./bin/peep.py install --user -r requirements/common.txt -r requirements/dev.txt --disable-pip-version-check
before_script:
- flake8 --show-source
- isort --check-only --diff --quiet
- grunt checkjs
# Required for Karma tests (http://docs.travis-ci.com/user/gui-and-headless-browsers/)
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
script:
- npm test
- py.test tests/$* --runslow
- ./node_modules/.bin/grunt build --production
2013-06-27 20:57:44 +04:00
notifications:
email:
on_success: never
on_failure: always
# Do not run these on the travis server at this time.
# The end to end tests require the service to be running, but travis can't
# start the service for us. So we would have to have the default point to
# a dedicated dev service instance that is reach-able by travis. However, we
# require /etc/hosts to have an entry at this point to reach our current dev
# server. So these tests should be run only locally for now.
# - karma start config/karma-e2e.conf.js --reporters=dots --browsers=Firefox