Skip to content

Commit 8e321da

Browse files
Switch to GitHub actions
1 parent 77d2917 commit 8e321da

File tree

3 files changed

+45
-24
lines changed

3 files changed

+45
-24
lines changed

.github/workflows/ci.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Ruby Test 💎
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
test:
11+
name: 💎 Test with Ruby ${{ matrix.ruby-version }}
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
ruby-version:
16+
- '3.1.7'
17+
- '3.2.8'
18+
- '3.3.8'
19+
- '3.4.4'
20+
21+
runs-on: ubuntu-22.04
22+
23+
steps:
24+
- name: 🔄 Checkout Repository
25+
uses: actions/checkout@v4
26+
27+
- name: 🛠️ Setup Ruby ${{ matrix.ruby-version }}
28+
uses: ruby/setup-ruby@v1
29+
with:
30+
ruby-version: ${{ matrix.ruby-version }}
31+
bundler-cache: true
32+
33+
- name: ☁️ Set up test cloud
34+
run: |
35+
export CLOUDINARY_URL=$(bash tools/get_test_cloud.sh)
36+
echo "CLOUDINARY_URL=$CLOUDINARY_URL" >> $GITHUB_ENV
37+
echo "cloud_name: $(echo $CLOUDINARY_URL | cut -d'@' -f2)"
38+
39+
- name: 🧪 Run tests
40+
run: bundle exec rspec --format documentation --color
41+
env:
42+
CLOUDINARY_URL: ${{ env.CLOUDINARY_URL }}

.travis.yml

Lines changed: 0 additions & 23 deletions
This file was deleted.

spec/uploader_spec.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -627,7 +627,9 @@
627627
end
628628

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

633635
it "should allow passing nil value" do

0 commit comments

Comments
 (0)