Skip to content

Commit

Permalink
chore: update active support tests for ruby testing matrix (#269)
Browse files Browse the repository at this point in the history
  • Loading branch information
bethesque authored Aug 17, 2022
1 parent 77edabf commit 93aa50b
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 5 deletions.
19 changes: 17 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,31 @@ on: [push, pull_request]
jobs:
test:
runs-on: "ubuntu-latest"
continue-on-error: ${{ matrix.experimental }}
strategy:
fail-fast: false
matrix:
ruby_version: ["2.4", "2.7", "3.0"]
experimental: [false]
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby_version }}
- run: "bundle install"
- run: "bundle exec rake"
test-with-active-support:
runs-on: "ubuntu-latest"
strategy:
fail-fast: false
matrix:
ruby_version: ["2.7", "3.0"]
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby_version }}
- run: "bundle install "
env:
BUNDLE_GEMFILE: active-support.gemfile
- run: "bundle exec rake spec_with_active_support"
env:
BUNDLE_GEMFILE: active-support.gemfile
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ log
.idea
reports
Gemfile.lock
*.gemfile.lock
gemfiles/*.gemfile.lock
reports/pacts
spec/examples.txt
Expand Down
2 changes: 1 addition & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ require 'rspec/core/rake_task'
Dir.glob('./lib/tasks/**/*.rake').each { |task| load task }
Dir.glob('./tasks/**/*.rake').each { |task| load task }

task :default => [:spec, :spec_with_active_support, 'spec:provider', 'pact:tests:all']
task :default => [:spec, 'spec:provider', 'pact:tests:all']

10 changes: 10 additions & 0 deletions active-support.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# This gemfile is used to test that the pact library works ok when active support is loaded.
# It is in a separate file because active support will not work on ruby 2.4, and the only
# place that should be using ruby 2.4 is the pact-ruby-standalone, which will be guaranteed not
# to have active support on it. I think :D

instance_eval File.read("Gemfile")

group :test do
gem 'activesupport', '~> 5.1'
end
3 changes: 1 addition & 2 deletions pact.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@ Gem::Specification.new do |gem|
gem.add_development_dependency 'webmock', '~> 3.0'
gem.add_development_dependency 'fakefs', '0.5' # 0.6.0 blows up
gem.add_development_dependency 'hashie', '~> 2.0'
gem.add_development_dependency 'activesupport', '~> 5.2'
gem.add_development_dependency 'faraday', '~> 2.0'
gem.add_development_dependency 'faraday', '~>1.0', '<3.0'
gem.add_development_dependency 'faraday-multipart', '~> 1.0'
gem.add_development_dependency 'conventional-changelog', '~> 1.3'
gem.add_development_dependency 'bump', '~> 0.5'
Expand Down

0 comments on commit 93aa50b

Please sign in to comment.