#302 Use Rust FFI #10: Remove pact broker
Pull request opened by
tienvx
This PR follow suggestion from
@Matt (pactflow.io / pact-js / pact-go) that:
• Don't embed cli (from Ruby Standalone) into Pact-PHP
• Recommend most users of Pact to pick your client language (e.g. PHP) and then download the CLI tools to do the CI/CD integration
One of the reason is: The Ruby Standalone has windows long file path and not working on a bunch of OS/Arch combinations. So bundling it into Pact PHP will mean Pact PHP won’t be installable on those same systems
@Matt (pactflow.io / pact-js / pact-go) will give further explanation if needed.
I think this suggestion make sense because:
• This speed up the tests, because if we register more than 1 listener, they will publish pacts multiple times.
• Sometime we just want to run the tests, but don't want to publish pacts (e.g. local development?)
• Let imagine there are 3 test suites (Unit, Contract, Integration) running in this specific order. If Unit and Contracts tests are passed, the listener publish pacts, but then Integration tests failed. Then I think we published some pacts that we don't really want.
For Github Actions it's quite easy to add a step to publish pacts while still follow other recommendation (like include commit SHA in the version, use branch instead of tag):
- name: Publish pacts
uses: pactflow/actions/publish-pact-files@auto_detect_version_branch
env:
pactfiles: tests/Contract/pacts
PACT_BROKER_BASE_URL: ${{ secrets.PACT_BROKER_BASE_URL }}
PACT_BROKER_TOKEN: ${{ secrets.PACT_BROKER_TOKEN }}
This PR depend on
#284. Please review it first.
pact-foundation/pact-php
✅ All checks have passed
20/20 successful checks