Skip to content
Draft
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
20 changes: 19 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,12 @@ jobs:
run: bundle exec rubocop --fail-level warning --display-only-fail-level-offenses --format github

test:
name: Test - ${{ matrix.gemfile }} - Ruby ${{ matrix.ruby }}
name: Test - ${{ matrix.gemfile }} - Ruby ${{ matrix.ruby }} - RSpec ${{ matrix.rspec }}
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
contents: read
checks: write
strategy:
fail-fast: false
matrix:
Expand All @@ -38,6 +41,7 @@ jobs:
activesupport-8.0,
activesupport-8.1,
]
rspec: ["3", "4"]
exclude:
# Rails 7.2 is >= 3.1
- ruby: "3.0"
Expand All @@ -52,9 +56,23 @@ jobs:
gemfile: activesupport-8.1
- ruby: 3.1
gemfile: activesupport-8.1
# RSpec 4 only on Ruby 4.0
- ruby: "3.0"
rspec: "4"
- ruby: 3.1
rspec: "4"
- ruby: 3.2
rspec: "4"
- ruby: 3.3
rspec: "4"
- ruby: 3.4
rspec: "4"
- ruby: 3.5
rspec: "4"

env:
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile
RSPEC_VERSION: ${{ matrix.rspec }}

steps:
- name: Checkout code
Expand Down
3 changes: 3 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
# Specify your gem's dependencies in marsh_grass.gemspec
gemspec

gem 'rspec', '>= 4.0.0.alpha', '< 5' if ENV['RSPEC_VERSION'] == '4'
gem 'rspec', '~> 3.6' if ENV['RSPEC_VERSION'] == '3'

Check failure on line 9 in Gemfile

View workflow job for this annotation

GitHub Actions / Lint

Bundler/DuplicatedGem: Gem `rspec` requirements already given on line 8 of the Gemfile.

group :development, :test do
gem 'rubocop'
gem 'rspec_junit_formatter'
Expand Down
2 changes: 1 addition & 1 deletion marsh_grass.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Gem::Specification.new do |spec|
spec.add_development_dependency 'pry-byebug', '~> 3'
spec.add_development_dependency 'rake', '~> 13.0'
spec.add_dependency 'activesupport', '>= 7.1', '< 9.0'
spec.add_dependency 'rspec', '~> 3.6'
spec.add_dependency 'rspec', '>= 3.6', '< 5'
spec.add_dependency 'rspec-rails', '~> 6'
spec.add_dependency 'timecop', '~> 0.9'
end
Loading