Skip to content

Commit

Permalink
Merge pull request #39 from splitrb/enable-github-actions
Browse files Browse the repository at this point in the history
Enable GitHub actions
  • Loading branch information
andrehjr authored Feb 22, 2022
2 parents 72e7cb9 + 5c8b88a commit 46976fb
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 14 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -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
8 changes: 0 additions & 8 deletions .travis.yml

This file was deleted.

6 changes: 1 addition & 5 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion split-analytics.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 46976fb

Please sign in to comment.