diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..448cc3b9 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,33 @@ +name: Ruby tests + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + test: + name: Ruby tests + runs-on: ubuntu-latest + + strategy: + matrix: + ruby-version: ['1.9.3', '2.0', '2.1', '2.2', '2.3', '2.4', '2.5', '2.6', '2.7', '3.0'] + experimental: [false] + + include: + - ruby-version: 'head' + experimental: true + + continue-on-error: ${{ matrix.experimental }} + + steps: + - uses: actions/checkout@v2 + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby-version }} + bundler-cache: true + - name: Run tests + run: bundle exec rake diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index d733590f..00000000 --- a/.travis.yml +++ /dev/null @@ -1,26 +0,0 @@ -# https://docs.travis-ci.com/user/customizing-the-build/ -os: linux -dist: xenial -language: ruby -cache: bundler -rvm: - - 1.9.3 - - 2.0.0 - - 2.1.10 - - 2.2.10 - - 2.3.8 - - 2.4.10 - - 2.5.8 - - 2.6.6 - - 2.7.2 - - ruby-head -jobs: - allow_failures: - - rvm: ruby-head - fast_finish: true -notifications: - recipients: - - nesquena@gmail.com - - databyte@gmail.com -before_install: - - gem install bundler -v 1.17.3 diff --git a/README.md b/README.md index a8c36e96..09a4fd98 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # RABL # -[![Continuous Integration status](https://secure.travis-ci.org/nesquena/rabl.svg)](http://travis-ci.org/nesquena/rabl) +[![Continuous Integration status](https://github.com/nesquena/rabl/actions/workflows/ci.yml/badge.svg)](https://github.com/nesquena/rabl/actions) [![Code Climate](https://codeclimate.com/github/nesquena/rabl.svg)](https://codeclimate.com/github/nesquena/rabl) RABL (Ruby API Builder Language) is a Rails and [Padrino](http://padrinorb.com) ruby templating system for generating JSON, XML, MessagePack, PList and BSON. diff --git a/Rakefile b/Rakefile index 9699394a..d1ba0fd1 100644 --- a/Rakefile +++ b/Rakefile @@ -35,7 +35,7 @@ desc "Prepares the fixtures being tested by installing dependencies" task "test:setup" do Dir[File.dirname(__FILE__) + "/fixtures/#{fixture_list}"].each do |fixture| puts "\n*** Setting up for #{File.basename(fixture)} tests ***\n" - `export BUNDLE_GEMFILE="#{fixture}/Gemfile"` if ENV["TRAVIS"] + `export BUNDLE_GEMFILE="#{fixture}/Gemfile"` if ENV["CI"] Bundler.with_clean_env { Dir.chdir(fixture) { puts `mkdir -p tmp/cache; bundle install --gemfile="#{fixture}/Gemfile"`