21 lines
547 B
Bash
Executable File
21 lines
547 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# Run tests in all supported Ruby versions
|
|
set -e
|
|
|
|
versions=("ruby-2.4.2" "ruby-2.3.5" "ruby-2.2.8")
|
|
installed_version="$(rvm list strings)"
|
|
for version in "${versions[@]}"; do
|
|
echo "Testing $version"
|
|
# Install this ruby version if not yet installed
|
|
if [[ "$installed_version" != *"$version"* ]]; then
|
|
echo "$version not found, installing it"
|
|
rvm install "$version"
|
|
fi
|
|
|
|
echo "Updating dependencies"
|
|
rvm "$version" exec bundle install
|
|
|
|
echo "Running tests"
|
|
rvm "$version" exec bundle exec rake test
|
|
done
|