Skip to content

Commit

Permalink
Move from Travis to GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosantoniodasilva committed Jan 29, 2021
1 parent 81bf3ad commit 7e6da42
Show file tree
Hide file tree
Showing 3 changed files with 99 additions and 112 deletions.
98 changes: 98 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
name: Test
on: [push, pull_request]
jobs:
test:
strategy:
fail-fast: false
matrix:
gemfile:
- Gemfile
- gemfiles/Gemfile.rails-6.0-stable
- gemfiles/Gemfile.rails-5.2-stable
- gemfiles/Gemfile.rails-5.1-stable
- gemfiles/Gemfile.rails-5.0-stable
- gemfiles/Gemfile.rails-4.2-stable
- gemfiles/Gemfile.rails-4.1-stable
ruby:
- 2.1.10
- 2.2.10
- 2.3.8
- 2.4.10
- 2.5.8
- 2.6.6
- 2.7.1
- ruby-head
env:
- DEVISE_ORM=active_record
- DEVISE_ORM=mongoid
exclude:
- ruby: 2.1.10
gemfile: Gemfile
- ruby: 2.1.10
gemfile: gemfiles/Gemfile.rails-6.0-stable
- ruby: 2.1.10
gemfile: gemfiles/Gemfile.rails-5.2-stable
- ruby: 2.1.10
gemfile: gemfiles/Gemfile.rails-5.1-stable
- ruby: 2.1.10
gemfile: gemfiles/Gemfile.rails-5.0-stable
- ruby: 2.2.10
gemfile: Gemfile
- ruby: 2.2.10
gemfile: gemfiles/Gemfile.rails-6.0-stable
- ruby: 2.2.10
gemfile: gemfiles/Gemfile.rails-5.2-stable
- ruby: 2.3.8
gemfile: Gemfile
- ruby: 2.3.8
gemfile: gemfiles/Gemfile.rails-6.0-stable
- ruby: 2.4.10
gemfile: Gemfile
- ruby: 2.4.10
gemfile: gemfiles/Gemfile.rails-6.0-stable
- ruby: 2.4.10
gemfile: gemfiles/Gemfile.rails-4.1-stable
- ruby: 2.5.8
gemfile: gemfiles/Gemfile.rails-4.1-stable
- ruby: 2.6.6
gemfile: gemfiles/Gemfile.rails-4.1-stable
- ruby: 2.6.6
gemfile: gemfiles/Gemfile.rails-4.2-stable
- ruby: 2.7.1
gemfile: gemfiles/Gemfile.rails-4.1-stable
- ruby: 2.7.1
gemfile: gemfiles/Gemfile.rails-4.1-stable
- ruby: 2.7.1
gemfile: gemfiles/Gemfile.rails-4.2-stable
- ruby: 2.7.1
gemfile: gemfiles/Gemfile.rails-5.0-stable
- ruby: 2.7.1
gemfile: gemfiles/Gemfile.rails-5.1-stable
- ruby: 2.7.1
gemfile: gemfiles/Gemfile.rails-5.2-stable
- ruby: ruby-head
gemfile: gemfiles/Gemfile.rails-4.1-stable
- ruby: ruby-head
gemfile: gemfiles/Gemfile.rails-4.2-stable
- env: DEVISE_ORM=mongoid
gemfile: Gemfile
- env: DEVISE_ORM=mongoid
gemfile: gemfiles/Gemfile.rails-5.0-stable
- env: DEVISE_ORM=mongoid
gemfile: gemfiles/Gemfile.rails-5.1-stable
- env: DEVISE_ORM=mongoid
gemfile: gemfiles/Gemfile.rails-5.2-stable
- env: DEVISE_ORM=mongoid
gemfile: gemfiles/Gemfile.rails-6.0-stable
runs-on: ubuntu-latest
env: # $BUNDLE_GEMFILE must be set at the job level, so it is set for all steps
BUNDLE_GEMFILE: ${{ matrix.gemfile }}
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true # runs bundle install and caches installed gems automatically
- uses: supercharge/mongodb-github-action@1.3.0
if: ${{ matrix.env == 'DEVISE_ORM=mongoid' }}
- run: bundle exec rake
110 changes: 0 additions & 110 deletions .travis.yml

This file was deleted.

3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
![Devise Logo](https://raw.github.com/heartcombo/devise/master/devise.png)

[![Build Status](https://api.travis-ci.org/heartcombo/devise.svg?branch=master)](http://travis-ci.org/heartcombo/devise)
[![Code Climate](https://codeclimate.com/github/heartcombo/devise.svg)](https://codeclimate.com/github/heartcombo/devise)

Devise is a flexible authentication solution for Rails based on Warden. It:
Expand Down Expand Up @@ -131,7 +130,7 @@ Please note that the command output will show the variable value being used.

### BUNDLE_GEMFILE
We can use this variable to tell bundler what Gemfile it should use (instead of the one in the current directory).
Inside the [gemfiles](https://github.com/heartcombo/devise/tree/master/gemfiles) directory, we have one for each version of Rails we support. When you send us a pull request, it may happen that the test suite breaks on Travis using some of them. If that's the case, you can simulate the same environment using the `BUNDLE_GEMFILE` variable.
Inside the [gemfiles](https://github.com/heartcombo/devise/tree/master/gemfiles) directory, we have one for each version of Rails we support. When you send us a pull request, it may happen that the test suite breaks using some of them. If that's the case, you can simulate the same environment using the `BUNDLE_GEMFILE` variable.
For example, if the tests broke using Ruby 2.4.2 and Rails 4.1, you can do the following:
```bash
rbenv shell 2.4.2 # or rvm use 2.4.2
Expand Down

0 comments on commit 7e6da42

Please sign in to comment.