update CI configuration to include Ruby 2.7 in the testing matrix #123
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
| name: serpapi-ruby | |
| on: | |
| push: | |
| branches: [ master, dev ] | |
| pull_request: | |
| branches: [ master ] | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| ruby: ['2.7.8', '3.1.0','3.4.4'] # test only recommend Ruby version (and stable version on the GitHub action server) | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: ${{ matrix.ruby }} | |
| bundler-cache: true | |
| # Install Bundler 2.4.x for Ruby 2.7 | |
| - name: Install Bundler 2.4.x for Ruby 2.7 | |
| if: matrix.ruby == '2.7.8' | |
| run: gem install bundler -v '~> 2.4' | |
| - name: install dependencies | |
| run: bundle install | |
| - name: lint | |
| run: bundle exec rake lint | |
| - name: tests | |
| env: | |
| SERPAPI_KEY: ${{ secrets.SERPAPI_KEY }} | |
| run: bundle exec rake test | |
| - name: out of box testing | |
| env: | |
| SERPAPI_KEY: ${{ secrets.SERPAPI_KEY }} | |
| run: bundle exec rake oobt |