From c0b16e7f77e1cec210ec8bcbbcb9f10dd1308d34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Luis=20Leal=20Cardoso=20Junior?= Date: Tue, 22 Feb 2022 10:37:58 -0300 Subject: [PATCH 1/3] Enable ci job --- .github/workflows/ci.yml | 43 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..40c4494 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,43 @@ +name: split-analytics + +on: [push] + +jobs: + test: + strategy: + matrix: + os: [ubuntu-latest] + ruby: + - 2.5 + - 2.6 + - 2.7 + - '3.0' + # - 3.1 + + services: + redis: + image: redis + ports: ['6379:6379'] + options: >- + --health-cmd "redis-cli ping" + --health-interval 10s + --health-timeout 5s + --health-retries 5 + + runs-on: ${{ matrix.os }} + + steps: + - uses: actions/checkout@v2 + + - uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby }} + + - name: Install dependencies + run: bundle install + + - name: Display Ruby version + run: ruby -v + + - name: Test + run: bundle exec rspec --backtrace From 497bed8145cfe107f9b401294502d2da75a9ad61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Luis=20Leal=20Cardoso=20Junior?= Date: Tue, 22 Feb 2022 10:57:48 -0300 Subject: [PATCH 2/3] Drop fakeredis --- spec/spec_helper.rb | 6 +----- split-analytics.gemspec | 1 - 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index f33237d..26c381b 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -5,17 +5,13 @@ require 'split/analytics' require 'ostruct' -require "fakeredis" - -G_fakeredis = Redis.new - module GlobalSharedContext extend RSpec::SharedContext let(:ab_user){ Split::User.new(double(session: {})) } before(:each) do Split.configuration = Split::Configuration.new - Split.redis = G_fakeredis + Split.redis = Redis.new(db: 10) Split.redis.flushall @ab_user = ab_user params = nil diff --git a/split-analytics.gemspec b/split-analytics.gemspec index 438154a..ebf1b91 100644 --- a/split-analytics.gemspec +++ b/split-analytics.gemspec @@ -20,5 +20,4 @@ Gem::Specification.new do |gem| gem.add_development_dependency('rspec', '~> 3.1') gem.add_development_dependency('rake', '~> 13.0') - gem.add_development_dependency('fakeredis', '~> 0.7') end From 5c8b88a9cbe20a54b27ea6b6598c23a86e7d1d1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Luis=20Leal=20Cardoso=20Junior?= Date: Tue, 22 Feb 2022 12:04:59 -0300 Subject: [PATCH 3/3] Remove travis config --- .travis.yml | 8 -------- 1 file changed, 8 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 974907b..0000000 --- a/.travis.yml +++ /dev/null @@ -1,8 +0,0 @@ -language: ruby -rvm: - - 2.2.4 - -services: - - redis-server -cache: bundler -sudo: false