Hi everyone! We've been able to successfully setup...
# general
i
Hi everyone! We've been able to successfully setup our first consumer contract and it's publishing. The way we are doing is that the developers write the unit tests (JUnit) locally and once they are fine with the pact, they push it to git. The publishing of the contract happens then in the CI pipeline (Github Action) with the help of pact-cli tool. There we are cleanly setting the consumer version according to pact best practice, the branch name and the tags. In Pactflow we see consumer version, branch, tags nicely filled up. Now we are looking towards the provider verification. We've written the tests then can verify the contracts but just wondering how the CI setup for it should look like. What is the recommended approach here? Should we be using the pact-cli here too? Also, how do we setup the provider version, branch etc. here? Do you have any example how to set all that up cleanly in a github action? Many thanks in advance :)
👋 2
d
they have some good guides here https://docs.pact.io/pact_nirvana regarding CI/CD, have you seen them yet?
m
On the provider side, th ebranch and version should be pulled from your git/SCM context I’m assuming it’s harder because for the consumer this is only needed in CI, whereas on the provider you need to also do this locally? In any case, most of our examples demonstrate how to do this with GH actions. See below (howtoexamples)
s
m
We also have a few pre-defined GH actions here (thanks to a previous contributor): https://github.com/pactflow/actions