Skip to content

Commit

Permalink
[#37] Move CI to GitHub Actions and deprecate old versions (#38)
Browse files Browse the repository at this point in the history
* [#38] Move CI to GitHub Actions and deprecate old versions

* [#37] Fix dummy project. Test Rails 5 only on Ruby 2

* [#37] Remove coveralls for now
  • Loading branch information
Angelmmiguel authored Mar 14, 2022
1 parent 21ac0cc commit c9267fa
Show file tree
Hide file tree
Showing 16 changed files with 83 additions and 68 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/ruby-rails-5-2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# The end of support for this version is 1st June 2022.
# TODO: Remove this action once it reaches EOL.
name: Ruby (Rails 5.2)

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
test:
runs-on: ubuntu-latest
env: # $BUNDLE_GEMFILE must be set at the job level, so it is set for all steps
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile
strategy:
fail-fast: false
matrix:
ruby-version:
- '2.7'
gemfile:
- rails_5_2
steps:
- uses: actions/checkout@v2
- name: Set up Ruby
uses: ruby/setup-ruby@v1
# uses: ruby/setup-ruby@473e4d8fe5dd94ee328fdfca9f8c9c7afc9dae5e
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- name: Run tests
run: bundle exec rspec
34 changes: 34 additions & 0 deletions .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Ruby

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
test:
runs-on: ubuntu-latest
env: # $BUNDLE_GEMFILE must be set at the job level, so it is set for all steps
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile
strategy:
fail-fast: false
matrix:
ruby-version:
- '2.7'
- '3.0'
- '3.1'
gemfile:
- rails_6_0
- rails_6_1
- rails_7_0
steps:
- uses: actions/checkout@v2
- name: Set up Ruby
uses: ruby/setup-ruby@v1
# uses: ruby/setup-ruby@473e4d8fe5dd94ee328fdfca9f8c9c7afc9dae5e
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- name: Run tests
run: bundle exec rspec
34 changes: 0 additions & 34 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![Gem Version](https://badge.fury.io/rb/material_icons.svg)](http://badge.fury.io/rb/material_icons) [![Build Status](https://travis-ci.org/Angelmmiguel/material_icons.svg?branch=master)](https://travis-ci.org/Angelmmiguel/material_icons) [![Code Climate](https://codeclimate.com/github/Angelmmiguel/material_icons/badges/gpa.svg)](https://codeclimate.com/github/Angelmmiguel/material_icons) [![Codacy Badge](https://api.codacy.com/project/badge/grade/5eb6d2d5a9d24ab98a1aed5835510e4f)](https://www.codacy.com/app/angelmm/material_icons) [![Coverage Status](https://coveralls.io/repos/github/Angelmmiguel/material_icons/badge.svg?branch=master)](https://coveralls.io/github/Angelmmiguel/material_icons?branch=master) [![Month donations](https://img.shields.io/badge/Month%20donations-0%24-green.svg)](https://www.paypal.me/angelmm/5)
[![Gem Version](https://badge.fury.io/rb/material_icons.svg)](http://badge.fury.io/rb/material_icons) [![Build Status](https://github.com/Angelmmiguel/material_icons/workflows/Ruby/badge.svg)](https://github.com/Angelmmiguel/material_icons/actions?query=workflow%3ARuby)

![Material Icons for Rails](https://raw.githubusercontent.com/Angelmmiguel/material_icons/master/material.png)

Expand Down
5 changes: 0 additions & 5 deletions gemfiles/rails_3_2.gemfile

This file was deleted.

4 changes: 0 additions & 4 deletions gemfiles/rails_4_1.gemfile

This file was deleted.

2 changes: 1 addition & 1 deletion gemfiles/rails_4_2.gemfile → gemfiles/rails_5_2.gemfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
source 'https://rubygems.org'
gemspec path: '../'

gem 'rails', '~> 4.2'
gem 'rails', '~> 5.2'
2 changes: 1 addition & 1 deletion gemfiles/rails_5_0.gemfile → gemfiles/rails_6_0.gemfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
source 'https://rubygems.org'
gemspec path: '../'

gem 'rails', '~> 5.0'
gem 'rails', '~> 6.0'
2 changes: 1 addition & 1 deletion gemfiles/rails_4_0.gemfile → gemfiles/rails_6_1.gemfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
source 'https://rubygems.org'
gemspec path: '../'

gem 'rails', '4.0.13'
gem 'rails', '~> 6.1'
7 changes: 7 additions & 0 deletions gemfiles/rails_7_0.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
source 'https://rubygems.org'
gemspec path: '../'

gem 'rails', '~> 7.0'

# Missing in Rails 7.0
gem 'sprockets-rails', '~> 3.4'
4 changes: 0 additions & 4 deletions gemfiles/rails_master.gemfile

This file was deleted.

1 change: 0 additions & 1 deletion material_icons.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ Gem::Specification.new do |s|
s.add_development_dependency 'rspec', '~> 3.2'
s.add_development_dependency 'rspec-rails', '~> 3.0'
s.add_development_dependency 'capybara', '~> 2.4.4'
s.add_development_dependency 'coveralls', '~> 0.8.2'
s.add_development_dependency 'pry', '~> 0.10.3'
s.add_development_dependency 'pry-nav', '~> 0.2.4'
end
5 changes: 5 additions & 0 deletions spec/dummy/app/assets/config/manifest.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// app/assets/config/manifest.js
//
//= link application.css
//
//= link application.js
10 changes: 0 additions & 10 deletions spec/dummy/config/environments/test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,4 @@
# This option may cause significant delays in view rendering with a large
# number of complex assets.
config.assets.debug = true

# Asset digests allow you to set far-future HTTP expiration dates on all assets,
# yet still be able to expire them through the digest params.
config.assets.digest = true

# For old versions of rails
config.secret_token = 'hjksfkhjdaheuifkj23hkjdaDSDFAJSDFHleuiwfkdj23iurkejlfdbsfASDFiorjkhefd'

# Raises error for missing translations
# config.action_view.raise_on_missing_translations = true
end
5 changes: 0 additions & 5 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
# Base configuration for RSPEC
ENV['RAILS_ENV'] ||= 'test'
require 'coveralls'
Coveralls.wear!
require File.expand_path('../dummy/config/environment.rb', __FILE__)
require 'capybara/rspec'
require 'rspec/rails'

require 'pry'
require 'pry-nav'

RSpec.configure do |config|
config.expect_with :rspec do |expectations|
expectations.include_chain_clauses_in_custom_matcher_descriptions = true
Expand Down
2 changes: 1 addition & 1 deletion spec/views/home/index.html.erb_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#
# Check if icon are rendered on home view
#
describe 'home/index.html.erb' do
describe 'home/index' do
before :each do
render
end
Expand Down

0 comments on commit c9267fa

Please sign in to comment.