Skip to content

Commit

Permalink
Support Rails v6 & Move to GitHub Actions (metaskills#95)
Browse files Browse the repository at this point in the history
Support Rails v6 & Move to GitHub Actions
  • Loading branch information
metaskills committed Sep 1, 2019
1 parent 2c3def3 commit d3da88e
Show file tree
Hide file tree
Showing 17 changed files with 398 additions and 469 deletions.
46 changes: 30 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,34 @@
name: Ruby

name: CI
on: [push]

jobs:
build:

test:
runs-on: ubuntu-latest

strategy:
matrix:
ruby:
- '2.5.x'
- '2.6.x'
rails:
- 'rails_v5.1.x'
- 'rails_v5.2.x'
- 'rails_v6.0.x'
steps:
- uses: actions/checkout@v1
- name: Set up Ruby
uses: actions/setup-ruby@v1
with:
ruby-version: 2.5.5
- name: Build and test with Rake
run: |
gem install bundler
bundle install --jobs 4 --retry 3
bundle exec rake
- name: Checkout
uses: actions/checkout@v1
- name: Setup System
run: |
sudo apt-get install libsqlite3-dev
- name: Setup Ruby
uses: actions/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
- name: Bundle
env:
MTSR_RAILS_VERSION: ${{ matrix.rails }}
run: |
export BUNDLE_GEMFILE="${GITHUB_WORKSPACE}/gemfiles/${MTSR_RAILS_VERSION}.gemfile"
gem uninstall -aIx bundler
gem install bundler -v 1.17.3
bundle install --jobs 4 --retry 3
- name: Test
run: bundle exec rake
25 changes: 0 additions & 25 deletions .travis.yml

This file was deleted.

23 changes: 10 additions & 13 deletions Appraisals
Original file line number Diff line number Diff line change
@@ -1,19 +1,16 @@
appraise 'rails41' do
gem 'rails', '~> 4.1.0'
end

appraise 'rails42' do
gem 'rails', '~> 4.2.0'
end

appraise 'rails50' do
gem 'rails', '5.0.0'
appraise 'rails-v5.1.x' do
gem 'rails', '~> 5.1.0'
# https://github.com/rails/rails/issues/29031
gem 'minitest', '5.10.1'
end

appraise 'rails51' do
gem 'rails', '5.1.0'
# https://github.com/rails/rails/issues/29031
gem 'minitest', '5.10.1'
appraise 'rails-v5.2.x' do
gem 'rails', '~> 5.2.0'
gem 'minitest'
end

appraise 'rails_v6.0.x' do
gem 'rails', '~> 6.0.0'
gem 'minitest'
end
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 5.6.0

* Add Rails v6 via gem spec support.

## 5.5.0

* Fix source_location of methods defined with `test`. Fixes #91. Thanks @barrettkingram
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
The minitest-spec-rails gem makes it easy to use the MiniTest::Spec DSL within your existing Rails 2.3, 3.x or 4.x test suite. It does this by forcing ActiveSupport::TestCase to utilize the MiniTest::Spec::DSL.

[![Gem Version](https://badge.fury.io/rb/minitest-spec-rails.svg)](http:https://badge.fury.io/rb/minitest-spec-rails)
[![Build Status](https://secure.travis-ci.org/metaskills/minitest-spec-rails.svg)](http:https://travis-ci.org/metaskills/minitest-spec-rails)
[![CI Status](https://github.com/metaskills/minitest-spec-rails/workflows/CI/badge.svg)](https:https://launch-editor.github.com/actions?nwo=metaskills%2Fminitest-spec-rails&workflowID=CI)
[![Maintainability](https://api.codeclimate.com/v1/badges/e67addda6fd009b68349/maintainability)](https://codeclimate.com/github/metaskills/minitest-spec-rails/maintainability)


Expand All @@ -15,9 +15,9 @@ The minitest-spec-rails gem makes it easy to use the MiniTest::Spec DSL within y
Existing or new Rails applications that use the default Rails testing structure can simply drop in the minitest-spec-gem and start writing their tests in the new spec DSL. Since MiniTest::Spec is built on top of MiniTest::Unit, a replacement for Test::Unit, all of your existing tests will continue to work.


#### Rails 4.1 or 4.2, 5.x
#### Rails 4.1 to 6.0

Our master branch is tracking rails 4.1, 4.2 and hopefully up to 5.x active development.
Our master branch is tracking rails 5.1 up to 6.x active development.

```ruby
group :test do
Expand Down Expand Up @@ -263,7 +263,7 @@ If your view helper tests give you an eror like this: `RuntimeError: In order to

## Contributing

We run our tests on [Travis CI](http:https://travis-ci.org/metaskills/minitest-spec-rails). If you detect a problem, open up a github issue or fork the repo and help out. After you fork or clone the repository, the following commands will get you up and running on the test suite.
We run our tests on GitHub Actions. If you detect a problem, open up a github issue or fork the repo and help out. After you fork or clone the repository, the following commands will get you up and running on the test suite.

```shell
$ bundle install
Expand All @@ -274,7 +274,7 @@ $ bundle exec appraisal rake test
We use the [appraisal](https://github.com/thoughtbot/appraisal) gem from Thoughtbot to help us generate the individual gemfiles for each Rails version and to run the tests locally against each generated Gemfile. The `rake appraisal test` command actually runs our test suite against all Rails versions in our `Appraisal` file. If you want to run the tests for a specific Rails version, use `bundle exec appraisal -h` for a list. For example, the following command will run the tests for Rails 4.1 only.

```shell
$ bundle exec appraisal rails41 rake test
$ bundle exec appraisal rails50 rake test
```

We have a few branches for each major Rails version.
Expand Down
95 changes: 0 additions & 95 deletions gemfiles/rails41.gemfile.lock

This file was deleted.

120 changes: 0 additions & 120 deletions gemfiles/rails42.gemfile.lock

This file was deleted.

Loading

0 comments on commit d3da88e

Please sign in to comment.