mirror of
https://github.com/lostisland/faraday.git
synced 2025-10-04 00:02:03 -04:00
Ci: ruby 2.7 (#1100)
* ci: run against ruby 2.7 * fix ruby 2.7 warning lib/faraday/adapter/net_http_persistent.rb:13: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call https://github.com/lostisland/faraday/pull/1099/checks?check_run_id=367324080 https://www.ruby-lang.org/en/news/2019/12/12/separation-of-positional-and-keyword-arguments-in-ruby-3-0/ * use rvm to install ruby 2.7
This commit is contained in:
parent
9726bc2029
commit
5a2bb2e5e6
25
.github/workflows/ci.yml
vendored
25
.github/workflows/ci.yml
vendored
@ -38,7 +38,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
ruby: [2.4.x, 2.5.x, 2.6.x]
|
||||
ruby: ['2.4', '2.5', '2.6', '2.7']
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
@ -47,27 +47,36 @@ jobs:
|
||||
run: |
|
||||
sudo apt-get install libcurl4-openssl-dev
|
||||
|
||||
- name: Set up RVM
|
||||
run: |
|
||||
curl -sSL https://get.rvm.io | bash
|
||||
|
||||
- name: Set up Ruby
|
||||
uses: actions/setup-ruby@v1
|
||||
with:
|
||||
ruby-version: ${{ matrix.ruby }}
|
||||
run: |
|
||||
source $HOME/.rvm/scripts/rvm
|
||||
rvm install ${{ matrix.ruby }} --disable-binary
|
||||
rvm --default use ${{ matrix.ruby }}
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
gem install bundler
|
||||
source $HOME/.rvm/scripts/rvm
|
||||
sudo apt-get install libcurl4-openssl-dev
|
||||
gem install bundler -v '<2'
|
||||
bundle install --jobs 4 --retry 3
|
||||
|
||||
- name: Setup Code Climate
|
||||
if: matrix.ruby == '2.6.x'
|
||||
if: matrix.ruby == '2.6'
|
||||
run: |
|
||||
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
|
||||
chmod +x ./cc-test-reporter
|
||||
./cc-test-reporter before-build
|
||||
|
||||
- name: Test
|
||||
run: bundle exec rake
|
||||
run: |
|
||||
source $HOME/.rvm/scripts/rvm
|
||||
bundle exec rake
|
||||
|
||||
- name: Run Code Climate Test Reporter
|
||||
if: success() && matrix.ruby == '2.6.x'
|
||||
if: success() && matrix.ruby == '2.6'
|
||||
run: ./cc-test-reporter after-build --coverage-input-type simplecov --exit-code $?
|
||||
continue-on-error: true
|
||||
|
@ -16,7 +16,7 @@ module Faraday
|
||||
if @connection_options.key?(:pool_size)
|
||||
options[:pool_size] = @connection_options[:pool_size]
|
||||
end
|
||||
Net::HTTP::Persistent.new(options)
|
||||
Net::HTTP::Persistent.new(**options)
|
||||
else
|
||||
Net::HTTP::Persistent.new('Faraday')
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user