diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..dd2bebf --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,48 @@ +name: Lint & Test + +on: [push, pull_request] + +jobs: + # lint: + # runs-on: ubuntu-latest + # steps: + # - uses: actions/checkout@v3 + # - uses: ruby/setup-ruby@v1 + # with: + # ruby-version: '3.0' + # bundler-cache: true + # - run: bundle exec rubocop + + test: + runs-on: ubuntu-latest + strategy: + matrix: + ruby: + - '2.5' + - '2.6' + gemfile: + - gemfiles/rails_61.gemfile + - gemfiles/rails_60.gemfile + - gemfiles/rails_52.gemfile + include: + # ruby 3.x + - ruby: '3.0' + gemfile: gemfiles/rails_61.gemfile + - ruby: '3.0' + gemfile: gemfiles/rails_60.gemfile + # old rails + - ruby: '2.5' + gemfile: gemfiles/rails_51.gemfile + - ruby: '2.5' + gemfile: gemfiles/rails_50.gemfile + - ruby: '2.5' + gemfile: gemfiles/rails_42.gemfile + env: + BUNDLE_GEMFILE: ${{ github.workspace }}/${{ matrix.gemfile }} + steps: + - uses: actions/checkout@v3 + - uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby }} + bundler-cache: true + - run: bundle exec rake spec diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 6f88ed7..0000000 --- a/.travis.yml +++ /dev/null @@ -1,30 +0,0 @@ -os: linux -dist: xenial -language: ruby -cache: bundler -rvm: -- 2.6 -- 2.5 -gemfile: -- gemfiles/rails_61.gemfile -- gemfiles/rails_60.gemfile -- gemfiles/rails_52.gemfile -jobs: - include: - # ruby 3.x - - rvm: 3.0 - gemfile: gemfiles/rails_61.gemfile - - rvm: 3.0 - gemfile: gemfiles/rails_60.gemfile - # old rails - - rvm: 2.5 - gemfile: gemfiles/rails_51.gemfile - - rvm: 2.5 - gemfile: gemfiles/rails_50.gemfile - - rvm: 2.5 - gemfile: gemfiles/rails_42.gemfile - # old rubies - - rvm: 2.4 - gemfile: gemfiles/rails_52.gemfile -notifications: - email: false diff --git a/README.md b/README.md index 010748b..17022ac 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [![Gem Version](https://badge.fury.io/rb/telegram-bot.svg)](http://badge.fury.io/rb/telegram-bot) [![Code Climate](https://codeclimate.com/github/telegram-bot-rb/telegram-bot/badges/gpa.svg)](https://codeclimate.com/github/telegram-bot-rb/telegram-bot) -[![Build Status](https://app.travis-ci.com/telegram-bot-rb/telegram-bot.svg)](https://app.travis-ci.com/github/telegram-bot-rb/telegram-bot) +[![Build Status](https://github.com/telegram-bot-rb/telegram-bot/actions/workflows/ci/badge.svg)](https://github.com/telegram-bot-rb/telegram-bot/actions/workflows/ci.yml) Tools for developing Telegram bots. Best used with Rails, but can be used in [standalone app](https://github.com/telegram-bot-rb/telegram-bot/wiki/Not-rails-application).