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

Bundle update, switch integration test drivers #681

Merged
merged 4 commits into from
Oct 28, 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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 3 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,15 @@
language: ruby
sudo: false
rvm:
- 2.3
- 2.4
services:
- xvfb
- mysql
- redis-server
addons:
apt:
packages:
- libmagic-dev
- qt5-default
- libqt5webkit5-dev
- gstreamer1.0-plugins-base
- gstreamer1.0-tools
chrome: stable
env: COVERALLS=1
cache: bundler
bundler_args:
Expand All @@ -24,4 +20,4 @@ before_script:
- "mysql -e 'grant all on foodsoft_test.* to travis;'"
- 'printf "test:\n adapter: mysql2\n database: foodsoft_test\n username: travis\n encoding: utf8\n" >config/database.yml'
- 'bundle exec rake db:schema:load RAILS_ENV=test'
script: xvfb-run -a bundle exec rake rspec-rerun:spec
script: bundle exec rake rspec-rerun:spec
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ruby:2.3
FROM ruby:2.4

RUN supercronicUrl=https://github.com/aptible/supercronic/releases/download/v0.1.3/supercronic-linux-amd64 && \
supercronicBin=/usr/local/bin/supercronic && \
Expand Down Expand Up @@ -34,14 +34,14 @@ RUN export DATABASE_URL=mysql2://localhost/temp && \
export SECRET_KEY_BASE=thisisnotimportantnow && \
export DEBIAN_FRONTEND=noninteractive && \
apt-get update && \
apt-get install -y mysql-server && \
apt-get install -y mariadb-server && \
/etc/init.d/mysql start && \
cp config/app_config.yml.SAMPLE config/app_config.yml && \
bundle exec rake db:setup assets:precompile && \
rm -Rf config/app_config.yml tmp/* && \
/etc/init.d/mysql stop && \
rm -Rf /run/mysqld /tmp/* /var/tmp/* /var/lib/mysql /var/log/mysql* && \
apt-get purge -y --auto-remove mysql-server && \
apt-get purge -y --auto-remove mariadb-server && \
rm -Rf /var/lib/apt/lists/* /var/cache/apt/*

# Make relevant dirs writable for app user
Expand Down
6 changes: 4 additions & 2 deletions Dockerfile-dev
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM ruby:2.3
FROM ruby:2.4

# Install dependencies
RUN deps='libmagic-dev xvfb qt5-default libqt5webkit5-dev gstreamer1.0-plugins-base gstreamer1.0-tools gstreamer1.0-x' && \
RUN deps='libmagic-dev chromium' && \
apt-get update && \
apt-get install --no-install-recommends -y $deps && \
rm -Rf /var/lib/apt/lists/* /var/cache/apt/*
Expand All @@ -12,6 +12,8 @@ ENV PORT=3000 \
RAILS_LOG_TO_STDOUT=true \
RAILS_SERVE_STATIC_FILES=true \
\
CHROMIUM_FLAGS=--no-sandbox \
\
BUNDLE_PATH=/home/app/bundle \
BUNDLE_APP_CONFIG=/home/app/bundle/config

Expand Down
3 changes: 2 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,8 @@ group :test do
gem 'factory_bot_rails'
gem 'faker'
gem 'capybara'
gem 'capybara-webkit'
gem 'puma' # for faster Capybara tests
gem 'apparition' # Capybara javascript driver
gem 'database_cleaner'
gem 'connection_pool'
# need to include rspec components before i18n-spec or rake fails in test environment
Expand Down
Loading