From 1f26a6e77c7f484baf1b27382fcad64f645dc56d Mon Sep 17 00:00:00 2001 From: James Lamont Date: Thu, 18 Apr 2024 00:11:41 +0000 Subject: [PATCH] improve: Added Github Action CI (#78) We previously used TravisCI to run specs. This PR replaces this with a Github Action. It also removes the version locks on development dependencies as they are very old. --- .github/workflows/ci.yml | 42 ++++++++++++++++++++++++++++++++++++++++ .travis.yml | 6 ------ Gemfile | 8 ++++---- spec/spec_helper.rb | 2 +- 4 files changed, 47 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..e2458ba --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,42 @@ +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 + + test: + runs-on: ubuntu-latest + + strategy: + matrix: + ruby-version: ["2.6.8", "2.7.8", "3.0.6", "3.1.4", "3.2.3", "3.3.0"] + + steps: + - uses: actions/checkout@v2 + + - name: Install Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby-version }} + 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|