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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 40 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,33 @@ jobs:
with:
ruby-version: ${{ matrix.ruby_version }}
bundler-cache: true
- run: "bundle exec rake"
- run: "bundle install && bundle exec rake spec"
- uses: you54f/pact-cli@main
- run: pact-cli 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 Zoo App Specs
run: "bundle install && bundle exec rake spec"
if: matrix.ruby_version > '3.0'
working-directory: example/zoo-app
- run: "bundle install && bundle exec rake pact:verify"
- name: Test Pact-Ruby Animal Service Specs
run: "bundle install && bundle exec rake pact:verify"
if: matrix.os != 'windows-latest' && matrix.ruby_version > '3.0'
working-directory: example/animal-service
- name: Test Pact-Ruby v2 spec:v2
run: "bundle exec rake spec:v2"
- name: Test Pact-Ruby v2 pact:v2:spec
run: "bundle exec rake pact:v2:spec"
- name: Test Pact-Ruby v2 pact:v2:verify
run: "bundle exec rake pact:v2:verify"
- 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
- 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

test-with-rack-2:
runs-on: ${{ matrix.os }}
strategy:
Expand All @@ -43,8 +63,17 @@ jobs:
with:
ruby-version: ${{ matrix.ruby_version }}
bundler-cache: true
- uses: you54f/pact-cli@main
- run: pact-cli plugin install --yes https://github.com/mefellows/pact-matt-plugin/releases/tag/v0.1.1
- run: "bundle exec appraisal install"
- run: "bundle exec appraisal rack-2 rake"
- run: "bundle exec appraisal rack-2 rake spec:v2"
- name: Test Mixed Pacts (Http/Kafaka/Grpc) - Pact-Ruby v2
run: "bundle exec appraisal rack-2 rake pact:v2:spec"
- 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'

test-with-active-support:
runs-on: ${{ matrix.os }}
strategy:
Expand All @@ -61,5 +90,12 @@ jobs:
with:
ruby-version: ${{ matrix.ruby_version }}
bundler-cache: true
- run: bundle install
- run: "bundle exec appraisal install"
- run: "bundle exec appraisal activesupport rake spec_with_active_support"
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'
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ _yardoc
coverage
lib/bundler/man
pkg
# grpc generated files required for testing
!spec/internal/pkg
rdoc
spec/reports
test/tmp
Expand All @@ -28,8 +30,9 @@ log
.idea
reports
Gemfile.lock
example/**/Gemfile.lock
*.gemfile.lock
gemfiles/*.gemfile.lock
gemfiles
reports/pacts
spec/examples.txt
*bethtest*
Expand Down
1 change: 0 additions & 1 deletion .rspec
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
--color
--format progress
--require spec_helper
4 changes: 4 additions & 0 deletions .rspec_v2
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
--color
--format progress
--require spec_helper_v2
--require rails_helper_v2
5 changes: 5 additions & 0 deletions Appraisals
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,9 @@ end

appraise "activesupport" do
gem "activesupport", "~> 5.1"
if RUBY_VERSION >= "3.4"
gem "csv"
gem "mutex_m"
gem "base64"
end
end
6 changes: 4 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ gemspec

gem "rspec-mocks", "3.13.5"
gem "appraisal", "~> 2.5"
gem "pact-support", git: "https://github.com/pact-foundation/pact-support.git", branch: "feat/generator_mock_server-url"

if ENV['X_PACT_DEVELOPMENT']
gem "pact-support", path: '../pact-support'
Expand All @@ -26,11 +27,12 @@ end
group :test do
gem 'faraday', '~>2.0', '<3.0'
gem 'faraday-retry', '~>2.0'
gem 'rackup', '~> 2.1'
gem 'rackup'
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw]
end

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