addons-server/.travis.yml

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

2014-08-07 15:11:48 +04:00
language: python
sudo: false
2014-08-07 15:11:48 +04:00
python:
- 2.7
2014-11-19 19:36:40 +03:00
env:
global:
- DISPLAY=:99.0
matrix:
- TOXENV=flake8
- TOXENV=docs
- TOXENV=assets
- TOXENV=es
- TOXENV=addons
- TOXENV=devhub
- TOXENV=editors
- TOXENV=amo
- TOXENV=users
- TOXENV=main
- TOXENV=ui-tests
cache:
pip: true
directories:
- node_modules
services:
2014-08-07 15:11:48 +04:00
- memcached
addons:
apt:
packages:
- swig
- gettext
Merge pull request #5791 from mozilla/1573-implement-django-jinja Loads of clean-ups along the way. Fixes #1573 * Moves all helpers modules to templatetags.jinja_helpers - there are a few things in there that aren't jinja related so there'll be a follow-up to split that later * Update Jinja2 to 2.9.6 * Add django-jinja 2.3.1 * move some jingo-minify helpers to olympia.lib to avoid any jingo imports * unified |f and |fe helpers into one |format_html helper that always escapes everything unless the input is already |safe * Move helpers, add requirements, fix imports. * Give backend a proper name * Port f and fe filters from jingo * Make start porting reviews jinja helpers module, make first test pass * Get a handful more tests working, get rid of get_env, more and more jingo calls. * Disable extension matching, render .txt templates too, fixes more stats tests * Fix csv_header template to produce some reasonable and csv parsable * Set trim_blocks to be compatible with jingo * Unify |f and |fe into one |format that simplifies escaping rules. Update tests. I think having one unified |format filter is beneficial, especially given that our current escaping rules were kinda complicated and allowed for seriously dangerous combinations even with autoescape activated. Now everything passed as an argument to |format is explicitly escaped unless marked as |safe, there's no way around that anymore. * Naive first version using |format instead of |f and |fe, might need more review. * Fix format for unicode strings * Rename |format to |format_html * Move nl2br_xhtml to amo.jinja_helpers, use it in all our templates. * Move datetime filter to our code temporarily, fix mocks, fix recursive error * Move csrf call to django_jinja csrf_token tag, fix addons templatetags * Fix |class_selected usage, fix render_with to get registered * Remove hack from zadmin, fix zadmin templatetags * Fix user delete photo test, don't rely on proper context updates that happen in order. * Fix more nl2br tests * Fix detail page escape, django escapes differently than jinja * Remove context from edit_review_reply_form * Fix date created format filter usage * Remove templates setting user, fix can_review * Fix collect_add_widget to not inherit the global context * Remove happy unicode client * Cleanup can_review, add tests * Fix tests, django use different html character for double quote escaping * Switch to firefox latest to check ui-tests * Cleanup and fix do_truncate * Remove jingo, copy jingo-minify helpers that depend on jingo to our lib for now * Rename nl2br_xhtml -> nl2br * Jinja 2.9 compat for reviews truncate filter * Don't use TEMPLATE_DEBUG * Set default value for q, happens on index page. * Fix jinja2 formatting with newstyle gettext
2017-07-01 03:57:31 +03:00
firefox: latest
2014-08-07 15:11:48 +04:00
before_install:
- scripts/travis_es.sh
- /tmp/elasticsearch/elasticsearch-1.6.2/bin/elasticsearch -d -D es.path.data=/tmp -D es.gateway.type=none -D es.index.store.type=memory -D es.discovery.zen.ping.multicast.enabled=false
2014-08-07 15:11:48 +04:00
install:
- nvm current
- nvm deactivate
2017-05-08 15:50:18 +03:00
- nvm install 6
- nvm use 6
2017-01-03 15:49:24 +03:00
- pip install --upgrade pip wheel setuptools tox==1.8.1
2014-08-07 15:11:48 +04:00
before_script:
- mysql -e 'create database olympia;'
- node --version
- |
if [[ $TOXENV == "ui-tests" ]]; then
2017-05-16 21:27:34 +03:00
wget -O /tmp/geckodriver.tar.gz https://github.com/mozilla/geckodriver/releases/download/v0.16.1/geckodriver-v0.16.1-linux64.tar.gz
mkdir $HOME/geckodriver && tar xvf /tmp/geckodriver.tar.gz -C $HOME/geckodriver
export PATH=$HOME/geckodriver:$PATH
firefox --version
geckodriver --version
sh -e /etc/init.d/xvfb start
sleep 10
fi
2014-08-07 15:11:48 +04:00
script:
- RUNNING_IN_CI=True tox -v
2014-08-07 15:11:48 +04:00
notifications:
irc:
channels:
- "irc.mozilla.org#amo-bots"
on_success: change
on_failure: always
git:
depth: 1