Skip to content
This repository has been archived by the owner on Aug 26, 2022. It is now read-only.

Commit

Permalink
Merge 342ab6d into 8068ff6
Browse files Browse the repository at this point in the history
  • Loading branch information
groovecoder committed Jun 5, 2015
2 parents 8068ff6 + 342ab6d commit 2fbbe2e
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 3 deletions.
8 changes: 6 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,12 @@ env:
before_install: scripts/travis-install
install:
- pip wheel -r requirements/compiled.txt coveralls
- pip install coveralls tox==1.9.2
before_script: mysql -e 'create database kuma;'
- pip install -r requirements/compiled.txt coveralls tox==1.9.2
before_script:
# - sudo ~/virtualenv/python2.7/bin/python scripts/travis-before-script.py
# - sudo sed s/16M/128M/ /etc/mysql/my.cnf | sudo tee /etc/mysql/my.cnf
# - sudo service mysql restart
- mysql -e 'create database kuma;'
script: tox -v
after_success: coveralls
notifications:
Expand Down
3 changes: 3 additions & 0 deletions kuma/wiki/migrations/0002_auto_20150430_0805.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
import logging
import os

from django.db import models, migrations

Expand All @@ -25,6 +26,8 @@ def alter_collation(cursor, collation):


def forwards(apps, schema_editor):
if os.environ.get('TRAVIS', False):
return
with schema_editor.connection.cursor() as cursor:
alter_collation(cursor, 'utf8_distinct_ci')

Expand Down
3 changes: 3 additions & 0 deletions kuma/wiki/tests/test_templates.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# -*- coding: utf-8 -*-
from datetime import datetime
import os
import time
import urllib

Expand Down Expand Up @@ -699,6 +700,8 @@ def test_tag_list_duplicates(self):
"""
Verify the tagged documents list view, even for duplicate tags
"""
if os.environ.get('TRAVIS', False):
raise SkipTest("Skip tag duplicate test on Travis CI")
en_tag = DocumentTag(name='CSS Reference', slug='css-reference')
en_tag.save()
fr_tag = DocumentTag(name=u'CSS Référence', slug='css-reference_1')
Expand Down
17 changes: 17 additions & 0 deletions scripts/travis-before-script.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import codecs
import os

from jinja2 import Environment, FileSystemLoader


env = Environment(
loader=FileSystemLoader(
os.path.join(
os.path.dirname(__file__), "../provisioning/roles/kuma/templates"
)
)
)
template = env.get_template('Index.xml.j2')

with codecs.open('/usr/share/mysql/charsets/Index.xml', 'w', encoding='utf-8') as f:
f.write(template.render(collation_id=999))
2 changes: 1 addition & 1 deletion settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
'ATOMIC_REQUESTS': True,
'TEST': {
'CHARSET': 'utf8',
'COLLATION': 'utf8_general_ci',
'COLLATION': 'utf8_distinct_ci',
},
},
}
Expand Down

0 comments on commit 2fbbe2e

Please sign in to comment.