From 7e6da424e27485bf5d9c09d0d7f89f463cfcf05d Mon Sep 17 00:00:00 2001 From: Carlos Antonio da Silva Date: Fri, 29 Jan 2021 16:56:28 -0300 Subject: [PATCH] Move from Travis to GitHub Actions --- .github/workflows/test.yml | 98 +++++++++++++++++++++++++++++++++ .travis.yml | 110 ------------------------------------- README.md | 3 +- 3 files changed, 99 insertions(+), 112 deletions(-) create mode 100644 .github/workflows/test.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000000..4b3dcaa246 --- /dev/null +++ b/.github/workflows/test.yml @@ -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 diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 3d1b6451e6..0000000000 --- a/.travis.yml +++ /dev/null @@ -1,110 +0,0 @@ -language: ruby - -rvm: - - 2.1.10 - - 2.2.10 - - 2.3.8 - - 2.4.10 - - 2.5.8 - - 2.6.6 - - 2.7.1 - - ruby-head - -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 - -matrix: - exclude: - - rvm: 2.1.10 - gemfile: Gemfile - - rvm: 2.1.10 - gemfile: gemfiles/Gemfile.rails-6.0-stable - - rvm: 2.1.10 - gemfile: gemfiles/Gemfile.rails-5.2-stable - - rvm: 2.1.10 - gemfile: gemfiles/Gemfile.rails-5.1-stable - - rvm: 2.1.10 - gemfile: gemfiles/Gemfile.rails-5.0-stable - - rvm: 2.2.10 - gemfile: Gemfile - - rvm: 2.2.10 - gemfile: gemfiles/Gemfile.rails-6.0-stable - - rvm: 2.2.10 - gemfile: gemfiles/Gemfile.rails-5.2-stable - - rvm: 2.3.8 - gemfile: Gemfile - - rvm: 2.3.8 - gemfile: gemfiles/Gemfile.rails-6.0-stable - - rvm: 2.4.10 - gemfile: Gemfile - - rvm: 2.4.10 - gemfile: gemfiles/Gemfile.rails-6.0-stable - - rvm: 2.4.10 - gemfile: gemfiles/Gemfile.rails-4.1-stable - - rvm: 2.5.8 - gemfile: gemfiles/Gemfile.rails-4.1-stable - - rvm: 2.6.6 - gemfile: gemfiles/Gemfile.rails-4.1-stable - - rvm: 2.6.6 - gemfile: gemfiles/Gemfile.rails-4.2-stable - - rvm: 2.7.1 - gemfile: gemfiles/Gemfile.rails-4.1-stable - - rvm: 2.7.1 - gemfile: gemfiles/Gemfile.rails-4.1-stable - - rvm: 2.7.1 - gemfile: gemfiles/Gemfile.rails-4.2-stable - - rvm: 2.7.1 - gemfile: gemfiles/Gemfile.rails-5.0-stable - - rvm: 2.7.1 - gemfile: gemfiles/Gemfile.rails-5.1-stable - - rvm: 2.7.1 - gemfile: gemfiles/Gemfile.rails-5.2-stable - - rvm: ruby-head - gemfile: gemfiles/Gemfile.rails-4.1-stable - - rvm: 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 - allow_failures: - - rvm: ruby-head - -services: - - mongodb - -cache: bundler - -env: - matrix: - - DEVISE_ORM=active_record - - DEVISE_ORM=mongoid - -before_install: - - gem uninstall -v '>= 2' -i $(rvm gemdir)@global -ax bundler || true - - gem install bundler -v '< 2' - - "rm ${BUNDLE_GEMFILE}.lock" - -before_script: "bundle update" - -script: "bin/test" - -notifications: - email: false - slack: - on_pull_requests: false - on_success: change - on_failure: always - secure: Q3M+kmude3FjisibEeeGe0wSMXgvwLH+vL7Zrx9//q4QtkfnrQ/BBMvY9KXxPEsNF+eys4YopYjTkJ8uRmeboUATW/oQ4Jrv3+u3zkIHK2sFn/Q2cQWpK5w+CbgEnHPjKYnUu34b09njXTgDlr/mqtbPqrKeZ1dLlpKXCB/q4GY= diff --git a/README.md b/README.md index 3dd93d7752..bf87d38fca 100644 --- a/README.md +++ b/README.md @@ -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: @@ -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