Sha256: 88c823d719dad68bd93f76ad8d35588880905f59815809867d510779e820e12a

Contents?: true

Size: 1.05 KB

Versions: 2

Compression:

Stored size: 1.05 KB

Contents

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

echo '--- testing rails 5.2'

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

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

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

2 entries across 2 versions & 1 rubygems

Version Path
cypress-on-rails-1.12.1 spec/integrations/rails_5_2/test.sh
cypress-on-rails-1.12.0 spec/integrations/rails_5_2/test.sh