From ea3dfeea7015fca3fb045977b33ac611d7843510 Mon Sep 17 00:00:00 2001 From: James Lamont Date: Wed, 17 Apr 2024 18:34:26 -0400 Subject: [PATCH] improve: Added Github Action CI --- .github/workflows/ci.yml | 108 +++++++++++++++++++++++++++++++++++++++ .travis.yml | 6 --- Gemfile | 8 +-- spec/spec_helper.rb | 2 +- 4 files changed, 113 insertions(+), 11 deletions(-) create mode 100644 .github/workflows/ci.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..76764e1 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,108 @@ +name: CI + +on: + push: + branches: + - master + pull_request: + +jobs: + lint: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Install Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: 2.6.8 + bundler-cache: true + + - name: RuboCop + run: bundle exec rubocop + ruby-26: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Install Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: 2.6.8 + bundler-cache: true + + - name: RSpec + run: bundle exec rspec + ruby-27: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Install Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: 2.7.8 + bundler-cache: true + + - name: RSpec + run: bundle exec rspec + ruby-3: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Install Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: 3.0.6 + bundler-cache: true + + - name: RSpec + run: bundle exec rspec + ruby-31: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Install Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: 3.1.4 + bundler-cache: true + + - name: RSpec + run: bundle exec rspec + ruby-32: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Install Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: 3.2.3 + bundler-cache: true + + - name: RSpec + run: bundle exec rspec + + ruby-33: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Install Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: 3.3.0 + bundler-cache: true + + - name: RSpec + run: bundle exec rspec diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index f0aa107..0000000 --- a/.travis.yml +++ /dev/null @@ -1,6 +0,0 @@ -language: ruby -rvm: - - "2.0.0" - - "2.1.5" - - "2.2.0" -script: bundle exec rspec spec diff --git a/Gemfile b/Gemfile index ca124a6..fa113c9 100644 --- a/Gemfile +++ b/Gemfile @@ -7,12 +7,12 @@ gemspec group :development do gem 'rubocop' - gem 'delayed_job', '~> 3.0.0' + gem 'delayed_job' gem 'delayed_job_active_record' - gem 'rails', '~> 3.0' + gem 'rails' gem 'resque' - gem 'sidekiq', '~> 3.5.1' - gem 'sucker_punch', '~> 2.1.2' + gem 'sidekiq' + gem 'sucker_punch' end group :test do diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index de4020b..2032ac7 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -5,7 +5,7 @@ require 'vero' require 'json' -Dir[::File.expand_path('support/**/*.rb', __dir__)].sort.each { |f| require f } +Dir[File.expand_path('support/**/*.rb', __dir__)].sort.each { |f| require f } RSpec.configure do |config| config.expect_with :rspec do |expectations|