surpher/PactSwift

PactSwift how to build on CI

Avengers-19 opened this issue · 3 comments

PactSwift:
we are unable to generate pact file while running on real time device, so we planned to generate pact file using CI.
Please share the information about how to generate and push the Pact file using CI.

Pact contract files will not be generated if running on a physical device due to pact_ffi writing to local disk (of the device it is running on).

Pact contract files will not be generated if any of the tests fail.

Where the Pact contracts get written to is explained here: https://github.com/surpher/PactSwift#generated-pact-contracts

We are going to publish pact file using pipeline
In android using gradlew to run

Examble code:
run: chmod +x gradlew
name: Run Tests
run: ./gradlew test --no-daemon -q
name: Push pacts to broker

In iOS swift how to publish the pact file using pipeline