surpher / PactSwift

A Swift version of Pact. Implements Pact Specification Version 3.
https://pact.io
MIT License
50 stars 16 forks source link

PactSwift how to build on CI #92

Closed Avengers-19 closed 2 years ago

Avengers-19 commented 2 years ago

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.

surpher commented 2 years ago

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

Avengers-19 commented 2 years ago

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

surpher commented 2 years ago

See https://github.com/surpher/PactSwift#sharing-pact-contracts