README.md in i18n-sequel_bitemporal-1.1.0 vs README.md in i18n-sequel_bitemporal-1.1.1

- old
+ new

@@ -1,6 +1,6 @@ -[![Build Status](https://travis-ci.org/TalentBox/i18n-sequel_bitemporal.svg?branch=master)](https://travis-ci.org/TalentBox/i18n-sequel_bitemporal) +[![Build Status](https://github.com/TalentBox/i18n-sequel_bitemporal/workflows/CI/badge.svg)](https://github.com/TalentBox/i18n-sequel_bitemporal/actions) # I18n::Backend::SequelBitemporal This repository contains an [I18n](http://github.com/svenfuchs/i18n) Sequel @@ -120,19 +120,55 @@ You can now use `I18n.t('Your String')` to lookup translations in the database. ## Runnning tests - gem install bundler - BUNDLE_GEMFILE=ci/Gemfile.rails-5.x bundle - BUNDLE_GEMFILE=ci/Gemfile.rails-5.x-i18n-0.6 bundle - BUNDLE_GEMFILE=ci/Gemfile.rails-5.x rake - BUNDLE_GEMFILE=ci/Gemfile.rails-5.x-i18n-0.6 rake +```shell +# Create db for mysql tests +mysql -e 'create database i18n_sequel_bitemporal;' --host 127.0.0.1 +# Create db for postgresql tests +createdb i18n_sequel_bitemporal -If you want to see what queries are executed: +## +# Run tests for a specific Rails version +## +BUNDLE_GEMFILE="ci/Gemfile.rails-6.1" bundle install +# MySQL +BUNDLE_GEMFILE="ci/Gemfile.rails-6.1" TEST_ADAPTER=mysql2 TEST_DATABASE=i18n_sequel_bitemporal TEST_ENCODING="utf8" bundle exec rake test +# PG +BUNDLE_GEMFILE="ci/Gemfile.rails-6.1" TEST_ADAPTER=postgresql TEST_DATABASE=i18n_sequel_bitemporal bundle exec rake test +# Sqlite +BUNDLE_GEMFILE="ci/Gemfile.rails-6.1" TEST_ADAPTER=sqlite3 TEST_DATABASE=test/database.sqlite3 bundle exec rake test - DEBUG=true BUNDLE_GEMFILE=ci/Gemfile.rails-5.x rake - DEBUG=true BUNDLE_GEMFILE=ci/Gemfile.rails-5.x-i18n-0.6 rake +## +# Run tests for a specific Rails version, logging all queries to stdout +## +BUNDLE_GEMFILE="ci/Gemfile.rails-6.1" bundle install +# MySQL +DEBUG=1 BUNDLE_GEMFILE="ci/Gemfile.rails-6.1" TEST_ADAPTER=mysql2 TEST_DATABASE=i18n_sequel_bitemporal TEST_ENCODING="utf8" bundle exec rake test +# PG +DEBUG=1 BUNDLE_GEMFILE="ci/Gemfile.rails-6.1" TEST_ADAPTER=postgresql TEST_DATABASE=i18n_sequel_bitemporal bundle exec rake test +# Sqlite +DEBUG=1 BUNDLE_GEMFILE="ci/Gemfile.rails-6.1" TEST_ADAPTER=sqlite3 TEST_DATABASE=test/database.sqlite3 bundle exec rake test + +## +# Example to run tests for every supported Rails version. +# !! Some Rails versions are not compatible with all Ruby versions !! +## +for gemfile in (ls ci/Gemfile.rails-* | grep -v lock); + echo $gemfile + BUNDLE_GEMFILE=$gemfile bundle install + + # MySQL + BUNDLE_GEMFILE=$gemfile TEST_ADAPTER=mysql2 TEST_DATABASE=i18n_sequel_bitemporal TEST_ENCODING="utf8" bundle exec rake test + + # PG + BUNDLE_GEMFILE=$gemfile TEST_ADAPTER=postgresql TEST_DATABASE=i18n_sequel_bitemporal bundle exec rake test + + # Sqlite + BUNDLE_GEMFILE=$gemfile TEST_ADAPTER=sqlite3 TEST_DATABASE=test/database.sqlite3 bundle exec rake test +end +``` ## Maintainers - Jonathan Tron