Skip to content

Commit 310c1bf

Browse files
authored
Merge pull request #109 from redis-store/use-github-actions
use GitHub Actions for CI
2 parents d3fc32a + fad57e7 commit 310c1bf

File tree

5 files changed

+73
-3
lines changed

5 files changed

+73
-3
lines changed

.github/workflows/ruby.yml

+63
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: Ruby
2+
3+
on:
4+
# Trigger the workflow on push or pull request,
5+
# but only for the master branch
6+
push:
7+
branches:
8+
- master
9+
pull_request:
10+
branches:
11+
- master
12+
13+
jobs:
14+
build:
15+
env:
16+
BUNDLE_GEMFILE: ${{ matrix.gemfile }}
17+
strategy:
18+
fail-fast: false
19+
matrix:
20+
ruby_version: [3.1, "3.0", 2.7, 2.6, jruby]
21+
gemfile:
22+
[
23+
Gemfile,
24+
gemfiles/rails_5.gemfile,
25+
gemfiles/rails_6.gemfile,
26+
gemfiles/rails_7.gemfile,
27+
]
28+
exclude:
29+
# Ruby 3.1 is not supported by Rails 5.2.x
30+
- ruby_version: 3.1
31+
gemfile: gemfiles/rails_5.gemfile,
32+
33+
# Ruby 3.x is not supported by Rails 5.2.x
34+
- ruby_version: 3.0
35+
gemfile: gemfiles/rails_5.gemfile,
36+
37+
# Ruby 2.6.x is not supported by Rails 7.0.x
38+
- ruby_version: 2.6
39+
gemfile: gemfiles/rails_7.gemfile
40+
41+
# Ruby 2.6.x is not supported by this Gemfile
42+
- ruby_version: 2.6
43+
gemfile: Gemfile
44+
45+
# JRuby is not supported by Rails 7.0.x
46+
- ruby_version: jruby
47+
gemfile: gemfiles/rails_7.gemfile
48+
49+
# JRuby is not supported by this Gemfile
50+
- ruby_version: jruby
51+
gemfile: Gemfile
52+
53+
runs-on: ubuntu-latest
54+
55+
steps:
56+
- uses: actions/checkout@v2
57+
- name: Set up Ruby
58+
uses: ruby/setup-ruby@v1
59+
with:
60+
ruby-version: ${{ matrix.ruby_version }}
61+
bundler-cache: true # 'bundle install' and cache
62+
- name: Build and test with Rake
63+
run: bundle exec rake

Gemfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ gemspec
1717
# gem "redis-actionpack", ">= 4.0.0", '< 5.1', path: gem_path
1818
# end
1919

20-
version = ENV["RAILS_VERSION"] || '5'
20+
version = ENV["RAILS_VERSION"] || '7'
2121

2222
rails = case version
2323
when "master"

gemfiles/rails_4.gemfile gemfiles/rails_6.gemfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22

33
source "https://rubygems.org"
44

5-
gem "rails", "~> 4"
5+
gem "rails", "~> 6"
66

77
gemspec :path => "../"

gemfiles/rails_7.gemfile

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# This file was generated by Appraisal
2+
3+
source "https://rubygems.org"
4+
5+
gem "rails", "~> 7"
6+
7+
gemspec :path => "../"

redis-rails.gemspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Gem::Specification.new do |s|
2121
s.add_dependency "redis-actionpack", [">= 3.0", "< 8"]
2222

2323
s.add_development_dependency 'rake', '>= 12.3.3'
24-
s.add_development_dependency "bundler", "~> 1.3"
24+
s.add_development_dependency "bundler", "~> 2"
2525
s.add_development_dependency "mocha", "~> 0.14.0"
2626
s.add_development_dependency "minitest", [">= 4.2", "< 6"]
2727
s.add_development_dependency "redis-store-testing"

0 commit comments

Comments
 (0)