From 9d527ae423b835e31c6cfd556be16300a65b0765 Mon Sep 17 00:00:00 2001 From: Roberto Rosario Date: Wed, 26 Oct 2016 01:41:22 -0400 Subject: [PATCH] Improve the UTF locale generation for the GitLab CI image. --- .gitlab-ci.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index eed0b5ed55..dca09a147b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -3,6 +3,10 @@ services: - mysql:latest - postgres before_script: + - echo "LC_ALL=\"en_US.UTF-8\"" >> /etc/default/locale + - locale-gen en_US.UTF-8 + - update-locale LANG=en_US.UTF-8 + - export LC_ALL=en_US.UTF-8 - apt-get update -qq - apt-get install -qq python-dev python-pip gcc gnupg1 tesseract-ocr tesseract-ocr-deu ghostscript libjpeg-dev libpng-dev libtiff-dev poppler-utils libreoffice variables: @@ -17,7 +21,7 @@ test:mysql: - pip install mysql-python - apt-get install -qq mysql-client - mysql -h"$MYSQL_PORT_3306_TCP_ADDR" -P"$MYSQL_PORT_3306_TCP_PORT" -uroot -p"$MYSQL_ENV_MYSQL_ROOT_PASSWORD" -e "ALTER DATABASE $MYSQL_DATABASE CHARACTER SET utf8 COLLATE utf8_unicode_ci;" - - LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 coverage run manage.py runtests --settings=mayan.settings.testing.gitlab-ci.db_mysql --nomigrations + - coverage run manage.py runtests --settings=mayan.settings.testing.gitlab-ci.db_mysql --nomigrations - bash <(curl https://raw.githubusercontent.com/codecov/codecov-bash/master/codecov) -t $CODECOV_TOKEN tags: - mysql @@ -26,12 +30,12 @@ test:postgres: - apt-get install -qq libpq-dev - pip install -r requirements/testing.txt - pip install psycopg2 - - LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 coverage run manage.py runtests --settings=mayan.settings.testing.gitlab-ci.db_postgres --nomigrations + - coverage run manage.py runtests --settings=mayan.settings.testing.gitlab-ci.db_postgres --nomigrations - bash <(curl https://raw.githubusercontent.com/codecov/codecov-bash/master/codecov) -t $CODECOV_TOKEN tags: - postgres test:sqlite: script: - pip install -r requirements/testing.txt - - LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 coverage run manage.py runtests --settings=mayan.settings.testing.gitlab-ci --nomigrations + - coverage run manage.py runtests --settings=mayan.settings.testing.gitlab-ci --nomigrations - bash <(curl https://raw.githubusercontent.com/codecov/codecov-bash/master/codecov) -t $CODECOV_TOKEN