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
46 changes: 46 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,49 @@ jobs:
RAILS_ENV: test
RAILS_MASTER_KEY: ${{ secrets.RAILS_MASTER_KEY }}
run: bin/test

test-api-gems:
name: Test API Gems
runs-on: ubuntu-latest
env:
BUNDLE_JOBS: 4
BUNDLE_RETRY: 3
BUNDLE_GEMFILE: ${{ matrix.gemfile }}
CI: true
ANTHROPIC_API_KEY: ANTHROPIC_API_KEY
OPEN_AI_API_KEY: OPEN_AI_API_KEY
OPEN_ROUTER_API_KEY: OPEN_ROUTER_API_KEY
strategy:
fail-fast: false
matrix:
ruby: ["3.4"]
gemfile:
- "gemfiles/anthropic_1.12.gemfile"
- "gemfiles/anthropic_1.14.gemfile"
- "gemfiles/openai_0.34.gemfile"
- "gemfiles/openai_0.35.gemfile"
steps:
- uses: actions/checkout@v5
- name: Install system deps
run: |
sudo apt-get update
sudo apt-get install --no-install-recommends -y build-essential git libyaml-dev pkg-config
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Setup database
env:
RAILS_ENV: test
RAILS_MASTER_KEY: ${{ secrets.RAILS_MASTER_KEY }}
BUNDLE_GEMFILE: ${{ github.workspace }}/${{ matrix.gemfile }}
run: |
cd test/dummy
bundle exec rails db:create
bundle exec rails db:migrate
cd ../..
- name: Run tests
env:
RAILS_ENV: test
RAILS_MASTER_KEY: ${{ secrets.RAILS_MASTER_KEY }}
run: bin/test
5 changes: 5 additions & 0 deletions gemfiles/anthropic_1.12.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
source "https://rubygems.org"

gem "anthropic", "~> 1.12.0"

gemspec path: ".."
5 changes: 5 additions & 0 deletions gemfiles/anthropic_1.14.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
source "https://rubygems.org"

gem "anthropic", "~> 1.14.0"

gemspec path: ".."
7 changes: 7 additions & 0 deletions gemfiles/openai_0.34.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# frozen_string_literal: true

source "https://rubygems.org"

gem "openai", "~> 0.34.0"

gemspec path: ".."
7 changes: 7 additions & 0 deletions gemfiles/openai_0.35.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# frozen_string_literal: true

source "https://rubygems.org"

gem "openai", "~> 0.35.0"

gemspec path: ".."
Loading