docs: Update README and gem description to match new positioning #395
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # workflows/ci.yml | |
| # | |
| # CI | |
| # Run lint, test matrix, and example checks for pull requests and main. | |
| name: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| workflow_dispatch: | |
| concurrency: | |
| group: ci-${{ github.head_ref || github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| POSTGRES_USER: postgres | |
| POSTGRES_PASSWORD: postgres | |
| POSTGRES_DB: postgres | |
| jobs: | |
| lint: | |
| name: Lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v7 | |
| - name: Set up Ruby | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: .ruby-version | |
| - name: Install RuboCop | |
| run: gem install rubocop --no-document | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.13" | |
| - name: Set up uv | |
| uses: astral-sh/setup-uv@v7 | |
| - name: Run RuboCop lint cops | |
| run: | | |
| rubocop --version | |
| rubocop --lint \ | |
| lib \ | |
| spec \ | |
| rails-paradedb.gemspec \ | |
| Rakefile | |
| - name: Check API coverage | |
| run: uv run --with json5 scripts/check_api_coverage.py | |
| - name: Gem install smoke test | |
| run: bash scripts/smoke_gem_install.sh | |
| matrix-tests: | |
| name: Ruby ${{ matrix.ruby-version }} / Rails ${{ matrix.rails-version }} | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| # Rails 7.2 supports Ruby 3.1+ — test on 3.2/3.3/3.4 | |
| - rails-version: "7.2" | |
| ruby-version: "3.2" | |
| gemfile: "gemfiles/rails72.gemfile" | |
| - rails-version: "7.2" | |
| ruby-version: "3.3" | |
| gemfile: "gemfiles/rails72.gemfile" | |
| - rails-version: "7.2" | |
| ruby-version: "3.4" | |
| gemfile: "gemfiles/rails72.gemfile" | |
| # Rails 8.1 supports Ruby 3.2+ | |
| - rails-version: "8.1" | |
| ruby-version: "3.2" | |
| gemfile: "Gemfile" | |
| - rails-version: "8.1" | |
| ruby-version: "3.3" | |
| gemfile: "Gemfile" | |
| - rails-version: "8.1" | |
| ruby-version: "3.4" | |
| gemfile: "Gemfile" | |
| - rails-version: "8.1" | |
| ruby-version: "4.0" | |
| gemfile: "Gemfile" | |
| services: | |
| paradedb: | |
| image: paradedb/paradedb:0.23.0-pg18 | |
| env: | |
| POSTGRES_USER: postgres | |
| POSTGRES_PASSWORD: postgres | |
| POSTGRES_DB: postgres | |
| ports: | |
| - 5432:5432 | |
| options: >- | |
| --health-cmd "pg_isready -U postgres -d postgres" | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 12 | |
| env: | |
| BUNDLE_GEMFILE: ${{ matrix.gemfile }} | |
| PARADEDB_TEST_DSN: postgresql://postgres:postgres@localhost:5432/postgres | |
| PGPASSWORD: postgres | |
| COVERAGE: "1" | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v7 | |
| - name: Set up Ruby ${{ matrix.ruby-version }} | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: ${{ matrix.ruby-version }} | |
| bundler-cache: true | |
| - name: Run unit tests | |
| env: | |
| COVERAGE_COMMAND_NAME: unit | |
| run: bundle exec rake test | |
| - name: Run integration tests | |
| env: | |
| COVERAGE_COMMAND_NAME: integration | |
| run: bundle exec rake test:integration | |
| - name: Upload to Codecov | |
| uses: codecov/codecov-action@v7 | |
| with: | |
| files: ./coverage/coverage.xml | |
| flags: rails-paradedb,rb${{ matrix.ruby-version }},rl${{ matrix.rails-version }} | |
| fail_ci_if_error: false | |
| verbose: true | |
| env: | |
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
| - name: Run examples | |
| if: matrix.ruby-version == '3.3' && matrix.rails-version == '8.1' | |
| env: | |
| DATABASE_URL: ${{ env.PARADEDB_TEST_DSN }} | |
| run: | | |
| set -euo pipefail | |
| BUNDLE_GEMFILE=examples/Gemfile bundle install --jobs 4 --retry 3 | |
| run_example() { | |
| local script="$1" | |
| local expected="$2" | |
| echo "Running ${script}" | |
| output="$(BUNDLE_GEMFILE=examples/Gemfile bundle exec ruby "${script}")" | |
| echo "${output}" | |
| echo "${output}" | grep -F "${expected}" >/dev/null | |
| } | |
| run_example examples/quickstart/quickstart.rb "rails-paradedb Quickstart Example" | |
| run_example examples/autocomplete/setup.rb "Autocomplete Setup - Creating Dedicated Table" | |
| run_example examples/autocomplete/autocomplete.rb "rails-paradedb Autocomplete Example" | |
| run_example examples/more_like_this/more_like_this.rb "rails-paradedb MoreLikeThis Example" | |
| run_example examples/faceted_search/faceted_search.rb "rails-paradedb Faceted Search Example" | |
| run_example examples/hybrid_rrf/setup.rb "Hybrid Search Setup - Loading Embeddings from CSV" | |
| run_example examples/hybrid_rrf/hybrid_rrf.rb "Hybrid Search with Reciprocal Rank Fusion (single SQL query)" |