Sha256: 89d08c963763011a13bdd4cd3e1d059cb97e7264722f7e4e63044ea76bae5716

Contents?: true

Size: 1 KB

Versions: 4

Compression:

Stored size: 1 KB

Contents

#!/usr/bin/env bash
set -eo pipefail

echo '--- testing rails 5.2'

echo '-- setting environment'
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
RAILS_ENV=test
BUNDLE_GEMFILE="$DIR/Gemfile"
cd $DIR

echo '-- bundle install'
bundle --version
bundle install --quiet --gemfile="$DIR/Gemfile" --retry 2 --path vendor/bundle

echo '-- migration'
bundle exec ./bin/rails db:drop || true
bundle exec ./bin/rails db:create db:migrate

echo '-- cypress install'
bundle exec ./bin/rails g cypress_on_rails:install --cypress_folder=test/cypress --no-install-cypress-examples

echo '-- start rails server'
# make sure the server is not running
(kill -9 `cat tmp/pids/server.pid` || true )

bundle exec ./bin/rails server -p 5017 -e test &
sleep 2 # give rails a chance to start up correctly

echo '-- cypress run'
cp -fv ../cypress.json test/
cd test
if [ -z $CYPRESS_RECORD_KEY ]
then
    yarn run cypress run
else
    yarn run cypress run --record
fi

echo '-- stop rails server'
kill -9 `cat ../tmp/pids/server.pid` || true

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
cypress-on-rails-1.11.0 spec/integrations/rails_5_2/test.sh
cypress-on-rails-1.10.1 spec/integrations/rails_5_2/test.sh
cypress-on-rails-1.9.1 spec/integrations/rails_5_2/test.sh
cypress-on-rails-1.9.0 spec/integrations/rails_5_2/test.sh