Skip to content

Commit

Permalink
Merge pull request #929 from mlarraz/master
Browse files Browse the repository at this point in the history
Use Github Actions for CI
  • Loading branch information
bblimke committed Feb 14, 2021
2 parents f1d9515 + 15f4e1e commit 3c5593b
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 3 deletions.
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

0 comments on commit 3c5593b

Please sign in to comment.