Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AO3-5607 Move Travis to Ubuntu Xenial 16.04 #3514

Merged
merged 1 commit into from
Feb 9, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
37 changes: 16 additions & 21 deletions .travis.yml
@@ -1,7 +1,9 @@
sudo: required
dist: xenial

language: ruby
dist: trusty
cache: bundler
sudo: required

env:
- TEST_GROUP="./script/check_syntax"
- TEST_GROUP="rake db:otwseed"
Expand All @@ -24,39 +26,32 @@ env:
- TEST_GROUP="cucumber -r features features/tags_and_wrangling -f Ao3Cucumber::Formatter --color"
- TEST_GROUP="cucumber -r features features/users -f Ao3Cucumber::Formatter --color"
- TEST_GROUP="cucumber -r features features/works -f Ao3Cucumber::Formatter --color"
addons:
apt:
sources:
- mysql-5.7-trusty
packages:
- mysql-server
- mysql-client
rvm:
- "`cat .ruby-version| sed -e 's/ruby //'`"

services:
- redis-server
- mysql
- redis
- memcached

before_install:
- bash script/travis_ebook_converters.sh
script:
- RAILS_ENV=test bundle exec rake db:schema:load --trace
- RAILS_ENV=test bundle exec rake db:migrate --trace
- bundle exec $TEST_GROUP

before_script:
- bash script/travis_configure.sh
- bash script/travis_elasticsearch_upgrade.sh
- bash script/travis_multiple_redis.sh
- bash script/travis_mysql.sh

script:
- RAILS_ENV=test bundle exec rake db:schema:load --trace
- RAILS_ENV=test bundle exec rake db:migrate --trace
- bundle exec $TEST_GROUP

after_failure:
- tail -v -n +1 $TRAVIS_BUILD_DIR/tmp/capybara/*.html

notifications:
email:
recipients:
- otw-coders-extra@transformativeworks.org
on_success: change
on_failure: always
irc:
channels:
- "irc.freenode.org#otw-dev"
on_success: change
on_failure: change
8 changes: 5 additions & 3 deletions script/travis_ebook_converters.sh
@@ -1,12 +1,14 @@
#!/bin/bash
set -e

sudo apt-get update -qq

# PDF
wget https://downloads.wkhtmltopdf.org/0.12/0.12.5/wkhtmltox_0.12.5-1.trusty_amd64.deb
sudo apt install ./wkhtmltox_0.12.5-1.trusty_amd64.deb
sudo apt-get install -qq xfonts-75dpi xfonts-base
wget https://downloads.wkhtmltopdf.org/0.12/0.12.5/wkhtmltox_0.12.5-1.xenial_amd64.deb
sudo dpkg -i ./wkhtmltox_0.12.5-1.xenial_amd64.deb
wkhtmltopdf --version

# Calibre
sudo apt-get update -qq
sudo apt-get install -qq calibre
ebook-convert --version
6 changes: 1 addition & 5 deletions script/travis_mysql.sh
Expand Up @@ -13,11 +13,7 @@ innodb_file_per_table=1\n\
/"
cat /etc/mysql/mysql.conf.d/mysqld.cnf

# Fix table performance_schema.session_variables not existing
# https://stackoverflow.com/q/31967527
sudo mysql_upgrade --force

# Both the upgrade and the conf change require a restart
# The conf change requires a restart
sudo service mysql restart

mysql -e "CREATE DATABASE otwarchive_test DEFAULT COLLATE utf8mb4_unicode_ci DEFAULT CHARACTER SET utf8mb4;"