Skip to content

Commit

Permalink
Cleanup tests
Browse files Browse the repository at this point in the history
Update CI
  • Loading branch information
iMacTia committed Aug 1, 2021
1 parent 22ca4ad commit 22c755e
Show file tree
Hide file tree
Showing 13 changed files with 33 additions and 407 deletions.
32 changes: 10 additions & 22 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
pull_request:

push:
branches: [main, 0.1x]
branches: [main, 1.x, 0.1x]

env:
GIT_COMMIT_SHA: ${{ github.sha }}
Expand All @@ -14,27 +14,23 @@ env:
jobs:
linting:
runs-on: ubuntu-latest
env:
BUNDLE_WITH: lint
BUNDLE_WITHOUT: development:test

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v2

- name: Set up Ruby 2.7
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7

- name: Rubocop
run: |
gem install bundler
bundle config set without 'development test'
bundle config set with 'lint'
bundle install
bundle exec rubocop --format progress
run: bundle exec rubocop --format progress

- name: Yard-Junk
run: |
gem install yard-junk --no-document
yard-junk --path lib
run: bundle exec yard-junk --path lib

build:
needs: [linting]
Expand All @@ -43,22 +39,14 @@ jobs:
strategy:
fail-fast: false
matrix:
ruby: ['2.4', '2.5', '2.6', '2.7', '3.0']
ruby: ['2.6', '2.7', '3.0']

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

- name: Install dependencies
run: |
sudo apt-get install libcurl4-openssl-dev
- name: Build
run: |
gem install bundler -v '<2'
bundle install --jobs 4 --retry 3
bundler-cache: true

- name: Test
continue-on-error: ${{ matrix.experimental }}
Expand Down
18 changes: 6 additions & 12 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,14 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@master
- uses: actions/checkout@v2

- name: Set up Ruby 2.6
- name: Set up Ruby 2.7
uses: actions/setup-ruby@v1
with:
ruby-version: 2.6.x
ruby-version: 2.7

- name: Publish to RubyGems
run: |
mkdir -p $HOME/.gem
touch $HOME/.gem/credentials
chmod 0600 $HOME/.gem/credentials
printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
gem build faraday.gemspec
gem push faraday-*.gem
env:
GEM_HOST_API_KEY: ${{ secrets.RUBYGEMS_AUTH_TOKEN }}
uses: dawidd6/action-publish-gem@v1
with:
api_key: ${{secrets.RUBYGEMS_AUTH_TOKEN}}
33 changes: 11 additions & 22 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,39 +2,28 @@

source 'https://rubygems.org'

ruby RUBY_VERSION

# Even though we don't officially support JRuby, this dependency makes Faraday
# compatible with it, so we're leaving it in for jruby users to use it.
gem 'jruby-openssl', '~> 0.10.7', platforms: :jruby

group :development, :test do
gem 'coveralls_reborn', require: false
gem 'multipart-parser'
gem 'pry'
gem 'rack', '~> 2.2'
gem 'rake'
gem 'rspec', '~> 3.7'
gem 'rspec_junit_formatter', '~> 0.4'
gem 'simplecov'
gem 'webmock', '~> 3.4'
end

group :lint, :development do
group :development, :lint do
gem 'rubocop', '~> 0.90.0'
gem 'rubocop-inclusivity', '~> 1.0'
gem 'rubocop-packaging', '~> 0.5'
gem 'rubocop-performance', '~> 1.0'
end

group :test, :development do
gem 'coveralls_reborn', require: false
gem 'em-http-request', '>= 1.1', require: 'em-http', platform: :ruby
gem 'em-synchrony', '>= 1.0.3', require: %w[em-synchrony em-synchrony/em-http], platform: :ruby
gem 'excon', '>= 0.27.4'
gem 'httpclient', '>= 2.2'
gem 'multipart-parser'
# 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', '>= 3.0', **options
gem 'patron', '>= 0.4.2', platforms: :ruby
gem 'rack-test', '>= 0.6', require: 'rack/test'
gem 'rspec', '~> 3.7'
gem 'rspec_junit_formatter', '~> 0.4'
gem 'simplecov'
gem 'typhoeus', '~> 1.4'
gem 'webmock', '~> 3.4'
gem 'yard-junk'
end

gemspec
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ Need more details? See the [Faraday API Documentation][apidoc] to see how it wor

## Supported Ruby versions

This library aims to support and is [tested against][actions] the following Ruby
implementations:

* Ruby 2.4+
This library aims to support and is [tested against][actions] the currently officially supported Ruby
implementations. This means that, even without a major release, we could add or drop support for Ruby versions,
following their [EOL](https://endoflife.date/ruby).
Currently that means we support Ruby 2.6+

If something doesn't work on one of these Ruby versions, it's a bug.

Expand Down
49 changes: 0 additions & 49 deletions spec/faraday/adapter/em_http_spec.rb

This file was deleted.

18 changes: 0 additions & 18 deletions spec/faraday/adapter/em_synchrony_spec.rb

This file was deleted.

49 changes: 0 additions & 49 deletions spec/faraday/adapter/excon_spec.rb

This file was deleted.

73 changes: 0 additions & 73 deletions spec/faraday/adapter/httpclient_spec.rb

This file was deleted.

Loading

0 comments on commit 22c755e

Please sign in to comment.