Skip to content

Commit 46976fb

Browse files
authored
Merge pull request #39 from splitrb/enable-github-actions
Enable GitHub actions
2 parents 72e7cb9 + 5c8b88a commit 46976fb

File tree

4 files changed

+44
-14
lines changed

4 files changed

+44
-14
lines changed

.github/workflows/ci.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: split-analytics
2+
3+
on: [push]
4+
5+
jobs:
6+
test:
7+
strategy:
8+
matrix:
9+
os: [ubuntu-latest]
10+
ruby:
11+
- 2.5
12+
- 2.6
13+
- 2.7
14+
- '3.0'
15+
# - 3.1
16+
17+
services:
18+
redis:
19+
image: redis
20+
ports: ['6379:6379']
21+
options: >-
22+
--health-cmd "redis-cli ping"
23+
--health-interval 10s
24+
--health-timeout 5s
25+
--health-retries 5
26+
27+
runs-on: ${{ matrix.os }}
28+
29+
steps:
30+
- uses: actions/checkout@v2
31+
32+
- uses: ruby/setup-ruby@v1
33+
with:
34+
ruby-version: ${{ matrix.ruby }}
35+
36+
- name: Install dependencies
37+
run: bundle install
38+
39+
- name: Display Ruby version
40+
run: ruby -v
41+
42+
- name: Test
43+
run: bundle exec rspec --backtrace

.travis.yml

Lines changed: 0 additions & 8 deletions
This file was deleted.

spec/spec_helper.rb

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,13 @@
55
require 'split/analytics'
66
require 'ostruct'
77

8-
require "fakeredis"
9-
10-
G_fakeredis = Redis.new
11-
128
module GlobalSharedContext
139
extend RSpec::SharedContext
1410
let(:ab_user){ Split::User.new(double(session: {})) }
1511

1612
before(:each) do
1713
Split.configuration = Split::Configuration.new
18-
Split.redis = G_fakeredis
14+
Split.redis = Redis.new(db: 10)
1915
Split.redis.flushall
2016
@ab_user = ab_user
2117
params = nil

split-analytics.gemspec

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,4 @@ Gem::Specification.new do |gem|
2020

2121
gem.add_development_dependency('rspec', '~> 3.1')
2222
gem.add_development_dependency('rake', '~> 13.0')
23-
gem.add_development_dependency('fakeredis', '~> 0.7')
2423
end

0 commit comments

Comments
 (0)