Skip to content
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
85 changes: 11 additions & 74 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,44 +23,21 @@ jobs:
with:
ruby-version: ${{ matrix.ruby_version }}
bundler-cache: true
env:
BUNDLE_WITH: v2
- uses: pact-foundation/pact-cli@main
- run: pact plugin install --yes https://github.com/mefellows/pact-matt-plugin/releases/tag/v0.1.1
- name: Test Pact-Ruby Specs
run: "bundle exec rake"
- name: Test Pact-Ruby Consumer Tests
run: "bundle exec rake pact:spec"
- name: Test Pact-Ruby Provider Verification
run: "bundle exec rake pact:verify"
- name: Test Pact-Ruby Zoo App Specs
run: "bundle install && bundle exec rake spec"
if: matrix.ruby_version > '3.0'
working-directory: example/zoo-app
- name: Test Pact-Ruby Animal Service Specs
- name: Test Pact-Ruby v2 Animal Service Specs
run: "bundle install && bundle exec rake pact:verify"
if: matrix.os != 'windows-latest' && matrix.ruby_version > '3.0'
if: matrix.os != 'windows-latest'
working-directory: example/animal-service
- name: Test Pact-Ruby v2 spec:v2
run: "bundle exec rake spec:v2"
env:
BUNDLE_WITH: v2
- name: Test Pact-Ruby v2 pact:v2:spec
run: "bundle exec rake pact:v2:spec"
env:
BUNDLE_WITH: v2
- name: Test Pact-Ruby v2 pact:v2:verify
run: "bundle exec rake pact:v2:verify"
env:
BUNDLE_WITH: v2
- name: Test Pact-Ruby v2 Zoo App Specs
run: "bundle install && bundle exec rake spec:v2"
if: matrix.ruby_version > '3.0'
working-directory: example/zoo-app-v2
env:
BUNDLE_WITH: v2
- name: Test Pact-Ruby v2 Animal Service Specs
run: "bundle install && bundle exec rake pact:v2:verify"
if: matrix.os != 'windows-latest' && matrix.ruby_version > '3.0'
working-directory: example/animal-service-v2
env:
BUNDLE_WITH: v2

test-with-rack-2:
runs-on: ${{ matrix.os }}
Expand All @@ -75,52 +52,12 @@ jobs:
with:
ruby-version: ${{ matrix.ruby_version }}
bundler-cache: true
env:
BUNDLE_WITH: v2
- uses: pact-foundation/pact-cli@main
- run: pact plugin install --yes https://github.com/mefellows/pact-matt-plugin/releases/tag/v0.1.1
- run: "bundle exec appraisal install"
env:
BUNDLE_WITH: v2
- run: "bundle exec appraisal rack-2 rake"
- run: "bundle exec appraisal rack-2 rake spec:v2"
env:
BUNDLE_WITH: v2
- name: Test Mixed Pacts (Http/Kafaka/Grpc) - Pact-Ruby v2
run: "bundle exec appraisal rack-2 rake pact:v2:spec"
env:
BUNDLE_WITH: v2
- name: Verify Mixed Pacts (Http/Kafaka/Grpc) - Pact-Ruby v2
run: "bundle exec appraisal rack-2 rake pact:v2:verify"
if: matrix.os != 'windows-latest' && matrix.ruby_version > '3.0'
env:
BUNDLE_WITH: v2

test-with-active-support:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
ruby_version: ["3.2", "3.3", "3.4"]
os: ["ubuntu-latest","windows-latest","macos-latest"]
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v5
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby_version }}
bundler-cache: true
env:
BUNDLE_WITH: v2
- run: bundle install
- run: "bundle exec appraisal install"
name: "install active support - pact-ruby"
- run: "bundle exec appraisal activesupport rake spec_with_active_support"
name: "test with active support - pact-ruby"
- run: "bundle exec rake spec:v2"
name: "test with active support - pact-ruby v2"
env:
LOAD_ACTIVE_SUPPORT: 'true'
BUNDLE_WITH: v2
- name: Test Mixed Pacts (Http/Kafaka/Grpc)
run: "bundle exec appraisal rack-2 rake pact:spec"
- name: Verify Mixed Pacts (Http/Kafaka/Grpc)
run: "bundle exec appraisal rack-2 rake pact:verify"
if: matrix.os != 'windows-latest'
2 changes: 2 additions & 0 deletions .rspec
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
--color
--format progress
--require spec_helper
--require rails_helper
4 changes: 0 additions & 4 deletions .rspec_v2

This file was deleted.

24 changes: 9 additions & 15 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,32 +3,26 @@ source 'https://rubygems.org'
# Specify your gem's dependencies in pact.gemspec
gemspec

gem "appraisal", "~> 2.5"
gem 'appraisal', '~> 2.5'

if ENV['X_PACT_DEVELOPMENT']
gem "pact-support", path: '../pact-support'
gem "pact-mock_service", path: '../pact-mock_service'
gem "pry-byebug"
end

group :v2, optional: true do
gem "pact-ffi", "~> 0.4.28"
gem "ffi"
gem 'pact-ffi', path: '../pact-ruby-ffi'
gem 'pry-byebug'
end

group :local_development do
gem "pry-byebug"
gem 'pry-byebug'
end

group :test do
gem 'faraday', '~>2.0', '<3.0'
gem 'faraday-retry', '~>2.0'
gem 'rackup'
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw]
gem 'tzinfo-data', platforms: %i[windows]
end

if RUBY_VERSION >= "3.4"
gem "csv"
gem "mutex_m"
gem "base64"
if RUBY_VERSION >= '3.4'
gem 'base64'
gem 'csv'
gem 'mutex_m'
end
Loading