Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Github Actions for CI #929

Merged
merged 1 commit into from
Feb 14, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: CI

on:
push:
branches:
- master
pull_request:

jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ruby:
- head
- '3.0'
- '2.7'
- '2.6'
- '2.5'
- jruby
continue-on-error: ${{ matrix.ruby == 'head' }}
name: Ruby ${{ matrix.ruby }}
env:
JRUBY_OPTS: "--debug"
steps:
- uses: actions/checkout@v2
- name: Install Apt Packages
run: |
sudo apt-get install libcurl4-openssl-dev -y
- uses: ruby/setup-ruby@v1
continue-on-error: true
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- run: |
bundle exec rake
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
source 'http://rubygems.org/'
source 'https://rubygems.org/'

gemspec

Expand Down
14 changes: 12 additions & 2 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,34 @@ Bundler::GemHelper.install_tasks

require "rspec/core/rake_task"
RSpec::Core::RakeTask.new(:spec) do |t|
t.rspec_opts = ["-c", "-f progress", "-r ./spec/spec_helper.rb"]
t.rspec_opts = %w[
--force-color
--format progress
--require ./spec/spec_helper.rb
]
t.pattern = 'spec/**/*_spec.rb'
end

RSpec::Core::RakeTask.new(:spec_http_without_webmock) do |t|
t.rspec_opts = ["-c", "-f progress", "-r ./spec/acceptance/net_http/real_net_http_spec.rb"]
t.rspec_opts = %w[
--force-color
--format progress
--require ./spec/acceptance/net_http/real_net_http_spec.rb
]
t.pattern = 'spec/acceptance/net_http/real_net_http_spec.rb'
end

require 'rake/testtask'
Rake::TestTask.new(:test) do |test|
test.test_files = FileList["test/**/*.rb"].exclude("test/test_helper.rb")
test.options = "--use-color"
test.verbose = false
test.warning = false
end

Rake::TestTask.new(:minitest) do |test|
test.test_files = FileList["minitest/**/*.rb"].exclude("test/test_helper.rb")
test.options = "--pride"
test.verbose = false
test.warning = false
end
Expand Down