Skip to content

Commit

Permalink
Switch to Github Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
guilhermef committed Jan 24, 2022
1 parent 0bb638d commit 3089502
Show file tree
Hide file tree
Showing 10 changed files with 65 additions and 105 deletions.
65 changes: 0 additions & 65 deletions .circleci/config.yml

This file was deleted.

39 changes: 39 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Ruby

on: [push, pull_request]

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
ruby-version: [2.6, 2.7, '3.0', 3.1, head, jruby, jruby-head]
env:
JRUBY_OPTS: "--debug"
steps:
- uses: actions/checkout@v2
- name: Set up Ruby ${{ matrix.ruby-version }}
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
- name: Install dependencies
run: bundle install
- name: Run tests
run: bundle exec rake spec
- name: Coveralls Parallel
uses: coverallsapp/github-action@1.1.3
if: ${{ !startsWith(matrix.ruby-version, 'jruby') }}
with:
github-token: ${{ secrets.github_token }}
flag-name: run-${{ matrix.ruby-version }}
parallel: true

finish:
needs: test
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@1.1.3
with:
github-token: ${{ secrets.github_token }}
parallel-finished: true
4 changes: 3 additions & 1 deletion .rspec
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
--color
--format documentation
--color
--require spec_helper
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.5.1
2.6.9
21 changes: 0 additions & 21 deletions .travis.yml

This file was deleted.

6 changes: 3 additions & 3 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ source 'https://rubygems.org'

gemspec

platforms :ruby do
gem 'coveralls', require: false
end
gem 'rspec'
gem 'simplecov', require: false
gem 'simplecov-lcov', require: false
2 changes: 1 addition & 1 deletion README.rdoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
= ruby-thumbor {<img src="https://secure.travis-ci.org/thumbor/ruby-thumbor.png?branch=master" alt="Build Status" />}[http://travis-ci.org/thumbor/ruby-thumbor] {<img src="https://badge.fury.io/rb/ruby-thumbor.svg" alt="Gem Version" />}[http://badge.fury.io/rb/ruby-thumbor] {<img src="https://coveralls.io/repos/thumbor/ruby-thumbor/badge.svg?branch=master&service=github" alt="Coverage Status" />}[https://coveralls.io/github/thumbor/ruby-thumbor?branch=master] {<img src="https://circleci.com/gh/thumbor/ruby-thumbor.svg?style=svg" alt="CircleCI" />}[https://circleci.com/gh/thumbor/ruby-thumbor]
= ruby-thumbor {<img src="https://github.com/thumbor/ruby-thumbor/actions/workflows/main.yml/badge.svg" alt="Build Status" />}[https://github.com/thumbor/ruby-thumbor/actions] {<img src="https://badge.fury.io/rb/ruby-thumbor.svg" alt="Gem Version" />}[http://badge.fury.io/rb/ruby-thumbor] {<img src="https://coveralls.io/repos/thumbor/ruby-thumbor/badge.svg?branch=master&service=github" alt="Coverage Status" />}[https://coveralls.io/github/thumbor/ruby-thumbor?branch=master]


* http://github.com/thumbor/ruby-thumbor
Expand Down
4 changes: 0 additions & 4 deletions ruby-thumbor.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,5 @@ Gem::Specification.new do |s|
s.homepage = 'http://github.com/thumbor/ruby-thumbor'
s.rdoc_options = ['--main', 'README.rdoc']
s.summary = 'ruby-thumbor is the client to the thumbor imaging service (http://github.com/thumbor/thumbor).'

s.add_development_dependency('rspec')
s.add_development_dependency('simplecov')
s.add_development_dependency('rake')
s.add_development_dependency('rspec_junit_formatter')
end
19 changes: 14 additions & 5 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -1,16 +1,25 @@

require 'simplecov'
begin
require 'coveralls'
rescue LoadError
puts 'Running on Jruby'
require 'simplecov-lcov'

SimpleCov::Formatter::LcovFormatter.config do |config|
config.report_with_single_file = true
config.single_report_path = 'coverage/lcov.info'
end

Coveralls.wear! if defined? Coveralls
SimpleCov.formatters = SimpleCov::Formatter::MultiFormatter[
SimpleCov::Formatter::HTMLFormatter,
SimpleCov::Formatter::LcovFormatter,
]

SimpleCov.start do
add_filter '/spec/'
end

SimpleCov.at_exit do
SimpleCov.result.format!
end

RSpec.configure do |c|
c.filter_run :focus => true
c.run_all_when_everything_filtered = true
Expand Down
8 changes: 4 additions & 4 deletions tasks/rspec.rake
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
require 'rspec/core/rake_task'

RSpec::Core::RakeTask.new(:spec) do |t|
t.rspec_opts = "--color "
begin
require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new(:spec)
rescue LoadError
end

0 comments on commit 3089502

Please sign in to comment.