Skip to content
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
2 changes: 1 addition & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ namespace :test do
ENV["PARADEDB_TEST_DSN"] ||= "postgresql://postgres:postgres@localhost:5432/postgres"
ENV["PGPASSWORD"] ||= "postgres"

sh "bundle exec rspec spec --pattern '**/*_integration_spec.rb,**/*integration*_spec.rb'"
sh "bundle exec rspec spec --pattern '**/*_integration_spec.rb'"
end

desc "Run all tests (unit + integration)"
Expand Down
20 changes: 17 additions & 3 deletions scripts/rbenv_bootstrap.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,20 @@
#!/usr/bin/env bash

set -euo pipefail
if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then
BOOTSTRAP_SOURCED=0
set -euo pipefail
else
BOOTSTRAP_SOURCED=1
fi

bootstrap_return() {
local code="${1:-0}"
if [[ "${BOOTSTRAP_SOURCED}" == "1" ]]; then
return "${code}"
fi

exit "${code}"
}

RUBY_VERSION="4.0.0"
BUNDLER_VERSION="4.0.3"
Expand All @@ -13,12 +27,12 @@ if command -v ruby >/dev/null 2>&1 && ruby --version | grep -qE "ruby 4\.(0|1)";
gem install "bundler:${BUNDLER_VERSION}"
fi
bundle install >/dev/null
exit 0
bootstrap_return 0
fi

if ! command -v rbenv >/dev/null 2>&1; then
echo "rbenv is not installed. Install rbenv and retry." >&2
exit 1
bootstrap_return 1
fi

eval "$(rbenv init -)"
Expand Down
2 changes: 1 addition & 1 deletion scripts/run_integration_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,5 @@ export PGPASSWORD="${PASSWORD}"
if [[ $# -gt 0 ]]; then
bundle exec rspec "$@"
else
bundle exec rspec spec --pattern '**/*_integration_spec.rb,**/*integration*_spec.rb'
bundle exec rspec spec --pattern '**/*_integration_spec.rb'
fi