Skip to content

Commit

Permalink
test against ruby head (#1208)
Browse files Browse the repository at this point in the history
* CI: add "head" Ruby to matrix

* Gemfile: Allow Ruby 3 to use net-http-client 4.x

* Gemfile: Select net-http-persistent 4 differently

Check for Ruby version 3+

* Gemfile: doc net-http-persistent has no gemspec

* redo

Co-authored-by: Olle Jonsson <olle.jonsson@auctionet.com>
Co-authored-by: Olle Jonsson <olle.jonsson@gmail.com>
  • Loading branch information
3 people committed Nov 28, 2020
1 parent b766d1f commit ebbbab5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/ci.yml
Expand Up @@ -39,29 +39,33 @@ jobs:
build:
needs: [linting]
runs-on: ubuntu-latest
name: build ${{ matrix.ruby }}
strategy:
fail-fast: false
matrix:
ruby: ['2.4', '2.5', '2.6', '2.7']
experimental: [false]
include:
- ruby: head
experimental: true

steps:
- uses: actions/checkout@v1
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}


- name: Install dependencies
run: |
sudo apt-get install libcurl4-openssl-dev
- name: Build
run: |
sudo apt-get install libcurl4-openssl-dev
gem install bundler -v '<2'
bundle install --jobs 4 --retry 3
- name: Test
run: |
bundle exec rake
continue-on-error: ${{ matrix.experimental }}
run: bundle exec rake

4 changes: 3 additions & 1 deletion Gemfile
Expand Up @@ -24,7 +24,9 @@ group :test, :development do
gem 'excon', '>= 0.27.4'
gem 'httpclient', '>= 2.2'
gem 'multipart-parser'
gem 'net-http-persistent', '~> 3.0'
# TODO: remove this once v4 is released
options = (RUBY_VERSION.start_with?('3') ? { github: 'grosser/net-http-persistent', branch: 'grosser/spec' } : {})
gem 'net-http-persistent', (RUBY_VERSION.start_with?('3') ? '>= 3.0' : '~> 3.0'), **options
gem 'patron', '>= 0.4.2', platforms: :ruby
gem 'rack-test', '>= 0.6', require: 'rack/test'
gem 'rspec', '~> 3.7'
Expand Down

0 comments on commit ebbbab5

Please sign in to comment.