File tree Expand file tree Collapse file tree 3 files changed +16
-7
lines changed
Expand file tree Collapse file tree 3 files changed +16
-7
lines changed Original file line number Diff line number Diff line change 99 runs-on : ubuntu-latest
1010 strategy :
1111 matrix :
12- ruby-version : ['3.1.0','head'] # test only recommend Ruby version (and stable version on the gitaction server)
13- # ruby-version: ['2.7.4','3.1.0','head']
12+ # test only recommend Ruby version (and stable version on the gitaction server)
13+ # GitHub action github.com/ruby/setup-ruby is pretty unstable with older Ruby version + dependencies
14+ # so, we only run a basic example with Ruby 2.7.8 after install the gem from the local build
15+ ruby-version : ['3.1.0','head']
1416 steps :
15- - uses : actions/checkout@v3
17+ - uses : actions/checkout@v4
1618 - name : Set up Ruby ${{ matrix.ruby-version }}
17- uses : ruby/setup-ruby@359bebbc29cbe6c87da6bc9ea3bc930432750108
19+ uses : ruby/setup-ruby@v1
1820 with :
1921 ruby-version : ${{ matrix.ruby-version }}
2022 - name : Install dependencies
2931 env :
3032 SERPAPI_KEY : ${{ secrets.SERPAPI_KEY }}
3133 run : bundle exec rake oobt
34+ - name : Run example with ruby 2.7.8
35+ uses : ruby/setup-ruby@v1
36+ with :
37+ ruby-version : ' 2.7.8'
38+ - name : Install and run demo 2.7.8
39+ env :
40+ SERPAPI_KEY : ${{ secrets.SERPAPI_KEY }}
41+ run : rake install && ruby demo/demo.rb
Original file line number Diff line number Diff line change @@ -30,9 +30,6 @@ test.rb
3030# # Text Editor
3131.vscode
3232
33- Gemfile.lock
34- build_table.rb
35-
3633# local script only
3734/script
3835README_ruby_EXAMPLE_SECTION.md
Original file line number Diff line number Diff line change 99require 'pp'
1010require 'serpapi'
1111
12+ puts "SerpApi Ruby Client Example with Ruby version: #{ RUBY_VERSION } "
13+
1214# client initialization with default parameters
1315client = SerpApi ::Client . new (
1416 engine : 'google' ,
You can’t perform that action at this time.
0 commit comments