Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable GitHub actions #39

Merged
merged 3 commits into from
Feb 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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