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
42 changes: 42 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Ruby Test 💎

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
test:
name: 💎 Test with Ruby ${{ matrix.ruby-version }}
strategy:
fail-fast: false
matrix:
ruby-version:
- '3.1.7'
- '3.2.8'
- '3.3.8'
- '3.4.4'

runs-on: ubuntu-22.04

steps:
- name: 🔄 Checkout Repository
uses: actions/checkout@v4

- name: 🛠️ Setup Ruby ${{ matrix.ruby-version }}
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true

- name: ☁️ Set up test cloud
run: |
export CLOUDINARY_URL=$(bash tools/get_test_cloud.sh)
echo "CLOUDINARY_URL=$CLOUDINARY_URL" >> $GITHUB_ENV
echo "cloud_name: $(echo $CLOUDINARY_URL | cut -d'@' -f2)"

- name: 🧪 Run tests
run: bundle exec rspec --format documentation --color
env:
CLOUDINARY_URL: ${{ env.CLOUDINARY_URL }}
23 changes: 0 additions & 23 deletions .travis.yml

This file was deleted.

4 changes: 3 additions & 1 deletion spec/uploader_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,9 @@
end

it "should fail if timeout is reached" do
expect { Cloudinary::Uploader.upload(Pathname.new(TEST_IMG), :tags => [TEST_TAG, TIMESTAMP_TAG]) }.to raise_error(Faraday::ConnectionFailed)
expect { Cloudinary::Uploader.upload(Pathname.new(TEST_IMG), :tags => [TEST_TAG, TIMESTAMP_TAG]) }.to raise_error { |error|
expect([Faraday::ConnectionFailed, Faraday::TimeoutError]).to include(error.class)
}
end

it "should allow passing nil value" do
Expand Down